[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Properly using Rake::TestTask

gga

3/21/2007 8:14:00 PM

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?