Shared code for anything that can get passed to a Reporter. See Minitest::Test & Minitest::Result.
# File lib/minitest.rb, line 484 def error? self.failures.any? { |f| UnexpectedError === f } end
Did this run error?
# File lib/minitest.rb, line 458 def location loc = " [#{self.failure.location}]" unless passed? or error? "#{self.class_name}##{self.name}#{loc}" end
The location identifier of this test. Depends on a method existing called class_name.
# File lib/minitest.rb, line 450 def passed? not self.failure end
Did this run pass?
Note: skipped runs are not considered passing, but they don't cause the process to exit non-zero.
# File lib/minitest.rb, line 470 def result_code self.failure and self.failure.result_code or "." end
Returns “.”, “F”, or “E” based on the result of the run.
# File lib/minitest.rb, line 477 def skipped? self.failure and Skip === self.failure end
Was this run skipped?
© Ryan Davis, seattle.rb
Licensed under the MIT License.