Rakefile: exit on failing test

And the world can always use more snark. ;-)
This commit is contained in:
Jo Liss 2011-01-12 00:27:44 +08:00 committed by José Valim
parent d87521723d
commit 42f2196d01
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ desc 'Run Devise tests for all ORMs.'
task :pre_commit do
Dir[File.join(File.dirname(__FILE__), 'test', 'orm', '*.rb')].each do |file|
orm = File.basename(file).split(".").first
system "rake test DEVISE_ORM=#{orm}"
# "Some day, my son, rake's inner wisdom will reveal itself. Until then,
# take this `system` -- may its brute force protect you well."
exit 1 unless system "rake test DEVISE_ORM=#{orm}"
end
end