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
35 36 37 38 39 40 41 42 |
# File 'lib/minitest/bacon.rb', line 35 def location # :nodoc: last_before_assertion = "" self.backtrace.reverse_each do |s| break if s.match?(/in [`'](?:[^']+[#.])?(?:method_missing|assert|refute|flunk|pass|fail|raise|must|wont)/) # :nodoc: last_before_assertion = s end last_before_assertion.sub(/:in .*$/, "") end |
#oldloc ⇒ Object
31 |
# File 'lib/minitest/bacon.rb', line 31 alias :oldloc :location |