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:
parent
03dc66444e
commit
726a2fc8d2
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue