mirror of
https://github.com/github/rails.git
synced 2026-01-09 22:58:02 -05:00
Give useful test:isolated failures
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user