Properly using Rake::TestTask

G

gga

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top