Exception: Tunit::Assertion
- Inherits:
-
Exception
- Object
- Exception
- Tunit::Assertion
- Defined in:
- lib/tunit/assertion_errors.rb
Instance Method Summary collapse
Instance Method Details
#error ⇒ Object
3 4 5 |
# File 'lib/tunit/assertion_errors.rb', line 3 def error self end |
#location ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/tunit/assertion_errors.rb', line 7 def location last_before_assertion = "" self.backtrace.reverse_each do |line| break if line =~ /in .(assert|refute|pass|raise)/ last_before_assertion = line end last_before_assertion.sub(/:in .*$/, "") end |
#result_code ⇒ Object
16 17 18 |
# File 'lib/tunit/assertion_errors.rb', line 16 def result_code result_label[0, 1] end |
#result_label ⇒ Object
20 21 22 |
# File 'lib/tunit/assertion_errors.rb', line 20 def result_label "Failure" end |