lib/test_queue/runner/minitest.rb in test-queue-0.1.3 vs lib/test_queue/runner/minitest.rb in test-queue-0.2.0.beta.1
- old
+ new
@@ -43,11 +43,12 @@
module TestQueue
class Runner
class MiniTest < Runner
def initialize
- super(::MiniTest::Unit::TestCase.original_test_suites.sort_by{ |s| -(stats[s.to_s] || 0) })
+ tests = ::MiniTest::Unit::TestCase.original_test_suites.sort_by{ |s| -(stats[s.to_s] || 0) }
+ super(tests)
end
def run_worker(iterator)
::MiniTest::Unit::TestCase.test_suites = iterator
::MiniTest::Unit.new.run
@@ -59,10 +60,11 @@
end
num_tests = worker.lines.grep(/ errors?, /).first
failures = worker.lines.select{ |line|
line if (line =~ /^Finished/) ... (line =~ / errors?, /)
- }[1..-2].join("\n")
+ }[1..-2]
+ failures = failures.join("\n") if failures
[ num_tests, failures ]
end
end
end