lib/minitest/test_runner.rb in minitest-reporters-0.14.2 vs lib/minitest/test_runner.rb in minitest-reporters-0.14.3
- old
+ new
@@ -1,3 +1,12 @@
module MiniTest
- TestRunner = Struct.new(:suite, :test, :assertions, :time, :result, :exception)
+ class TestRunner < Struct.new(:suite, :test, :assertions, :time, :exception)
+ def result
+ case exception
+ when nil then :pass
+ when Skip then :skip
+ when Assertion then :failure
+ else :error
+ end
+ end
+ end
end