Class: Minitest::Assertion
Instance Method Summary collapse
-
#location ⇒ Object
override to add method_missing.
- #oldloc ⇒ Object
Instance Method Details
#location ⇒ Object
override to add method_missing
21 22 23 24 25 26 27 28 |
# File 'lib/minitest/bacon.rb', line 21 def location # :nodoc: last_before_assertion = "" self.backtrace.reverse_each do |s| break if s =~ /in .(method_missing|assert|refute|flunk|pass|fail|raise|must|wont)/ last_before_assertion = s end last_before_assertion.sub(/:in .*$/, "") end |
#oldloc ⇒ Object
17 |
# File 'lib/minitest/bacon.rb', line 17 alias :oldloc :location |