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-01 13:44:24 +01:00
parent 14370e1aab
commit 13004c37e6

View file

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