Exception: Mocha::StubbingError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mocha/stubbing_error.rb

Overview

Exception raised when an action prevented by Configuration#prevent is attempted.

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, backtrace = []) ⇒ StubbingError

:nodoc:



8
9
10
11
12
# File 'lib/mocha/stubbing_error.rb', line 8

def initialize(message = nil, backtrace = []) # :nodoc:
  super(message)
  filter = BacktraceFilter.new
  set_backtrace(filter.filtered(backtrace))
end