diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-01-05 08:52:02 -0800 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-01-05 08:52:02 -0800 |
commit | 377a879e12259f30566eb4a8007c924c27f04d8a (patch) | |
tree | 545af6bac69c48d0a37e6d71eb0d88186a0b95c9 /activesupport/test/isolation_test.rb | |
parent | dcd317b262ad787a4ed0ef45d879802b22339adc (diff) | |
parent | c776075addec6d7725a6109e862ce818a58e336c (diff) | |
download | rails-377a879e12259f30566eb4a8007c924c27f04d8a.tar.gz rails-377a879e12259f30566eb4a8007c924c27f04d8a.tar.bz2 rails-377a879e12259f30566eb4a8007c924c27f04d8a.zip |
Merge pull request #4319 from castlerock/parse_only_minitest_results
parse only minitest results in isolation test
Diffstat (limited to 'activesupport/test/isolation_test.rb')
-rw-r--r-- | activesupport/test/isolation_test.rb | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/activesupport/test/isolation_test.rb b/activesupport/test/isolation_test.rb index 2c2986ea28..c1932d73d9 100644 --- a/activesupport/test/isolation_test.rb +++ b/activesupport/test/isolation_test.rb @@ -80,26 +80,6 @@ else ENV.delete("CHILD") def setup - defined?(::MiniTest) ? parse_minitest : parse_testunit - end - - def parse_testunit - @results = {} - OUTPUT[/Started\n\s*(.*)\s*\nFinished/mi, 1].to_s.split(/\s*\n\s*/).each do |result| - result =~ %r'^(\w+)\(\w+\):\s*(\.|E|F)$' - @results[$1] = { 'E' => :error, '.' => :success, 'F' => :failure }[$2] - end - - # Extract the backtraces - @backtraces = {} - OUTPUT.scan(/^\s*\d+\).*?\n\n/m).each do |backtrace| - # \n 1) Error:\ntest_captures_errors(ChildIsolationTest): - backtrace =~ %r'\s*\d+\)\s*(Error|Failure):\n(\w+)'i - @backtraces[$2] = { :type => $1, :output => backtrace } - end - end - - def parse_minitest @results = {} OUTPUT[/Started\n\s*(.*)\s*\nFinished/mi, 1].to_s.split(/\s*\n\s*/).each do |result| result =~ %r'^\w+#(\w+):.*:\s*(.*Assertion.*|.*RuntimeError.*|\.\s*)$' @@ -115,7 +95,7 @@ else OUTPUT.scan(/^\s*\d+\).*?\n\n/m).each do |backtrace| # \n 1) Error:\ntest_captures_errors(ChildIsolationTest): backtrace =~ %r'\s*\d+\)\s*(Error|Failure):\n(\w+)'i - @backtraces[$2] = { :type => $1, :output => backtrace } + @backtraces[$2] = {:type => $1, :output => backtrace} end end |