Exception: Minitest::Assertion

Inherits:
Exception show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/lib/minitest.rb

Overview

Represents run failures.

Direct Known Subclasses

Skip, UnexpectedError

Instance Method Summary collapse

Methods inherited from Exception

#as_json

Instance Method Details

#errorObject

:nodoc:



896
897
898
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/lib/minitest.rb', line 896

def error # :nodoc:
  self
end

#locationObject

Where was this run before an assertion was raised?



903
904
905
906
907
908
909
910
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/lib/minitest.rb', line 903

def location
  last_before_assertion = ""
  self.backtrace.reverse_each do |s|
    break if s =~ /in .(assert|refute|flunk|pass|fail|raise|must|wont)/
    last_before_assertion = s
  end
  last_before_assertion.sub(/:in .*$/, "")
end

#result_codeObject

:nodoc:



912
913
914
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/lib/minitest.rb', line 912

def result_code # :nodoc:
  result_label[0, 1]
end

#result_labelObject

:nodoc:



916
917
918
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/lib/minitest.rb', line 916

def result_label # :nodoc:
  "Failure"
end