Class: RSpec::Mocks::InsertOntoBacktrace

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/mocks/message_expectation.rb

Overview

Insert original locations into stacktraces

Class Method Summary (collapse)

Class Method Details

+ (Object) line(location)



641
642
643
644
645
646
# File 'lib/rspec/mocks/message_expectation.rb', line 641

def self.line(location)
  yield
rescue RSpec::Mocks::MockExpectationError => error
  error.backtrace.insert(0, location)
  Kernel::raise error
end