lib/minitest/test_runner.rb in minitest-reporters-0.9.0 vs lib/minitest/test_runner.rb in minitest-reporters-0.10.0

- old
+ new

@@ -1,39 +1,3 @@ module MiniTest - # Runner for individual MiniTest tests. - # - # You *should not* create instances of this class directly. Instances of - # {SuiteRunner} will create these and send them to the reporters. - # - # Based upon Ryan Davis of Seattle.rb's MiniTest (MIT License). - # - # @see https://github.com/seattlerb/minitest MiniTest - class TestRunner - attr_reader :suite, :test, :assertions, :result, :exception, :options - - def initialize(suite, test) - @suite = suite - @test = test - @assertions = 0 - end - - def run - suite_instance = suite.new(test) - @result, @exception = fix_result(suite_instance.run(self)) - @assertions = suite_instance._assertions - end - - def puke(suite, test, exception) - case exception - when Skip then [:skip, exception] - when Assertion then [:failure, exception] - else [:error, exception] - end - end - - private - - def fix_result(result) - result == '.' ? [:pass, nil] : result - end - end + TestRunner = Struct.new(:suite, :test, :assertions, :time, :result, :exception) end