Class: Minitest::Assertion

Inherits:
Object show all
Defined in:
lib/minitest/bacon.rb

Instance Method Summary collapse

Instance Method Details

#locationObject

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

#oldlocObject



17
# File 'lib/minitest/bacon.rb', line 17

alias :oldloc :location