1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Give useful test:isolated failures

This commit is contained in:
Jeremy Kemper 2009-11-04 12:44:06 -08:00
parent 03dc66444e
commit 726a2fc8d2

View file

@ -10,8 +10,8 @@ class TestIsolated < Test::Unit::TestCase
Dir["#{File.dirname(__FILE__)}/{abstract,controller,dispatch,template}/**/*_test.rb"].each do |file| Dir["#{File.dirname(__FILE__)}/{abstract,controller,dispatch,template}/**/*_test.rb"].each do |file|
define_method("test #{file}") do define_method("test #{file}") do
command = "#{ruby} -Ilib:test #{file}" command = "#{ruby} -Ilib:test #{file}"
silence_stderr { `#{command}` } result = silence_stderr { `#{command}` }
assert_equal 0, $?.to_i, command assert_block("#{command}\n#{result}") { $?.to_i.zero? }
end end
end end
end end