Forum: Ruby Properly using Rake::TestTask

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
gga (Guest)
on 2007-03-21 22:15
(Received via mailing list)
I have a Rakefile that I am using to create and upload a gem.
However, I am having a problem with Rake::TestTask not aborting the
make when of the unit tests fails.

I'm basically doing:

spec = Gem::Specification.new do |spec|
#...etc..
end

Rake::GemPackageTask.new(spec)


Rake::TestTask.new do |t|
   t.libs << 'test'
   t.test_files = FileList['test/*.rb']
   t.verbose = true
   t.warning = true
end

task 'upload-gem' => ['test', 'gem'] do
end

task :default => ['upload-gem']
end

How do I make my unit tests abort the gem creation?
This topic is locked and can not be replied to.