Exception: Mocha::StubbingError

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

Overview

Exception raised when stubbing a particular method is not allowed.

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of StubbingError


11
12
13
14
15
# File 'lib/mocha/stubbing_error.rb', line 11

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