class Mocha::Mockery::Null

Public Instance Methods

add_mock(*) click to toggle source
# File lib/mocha/mockery.rb, line 15
def add_mock(*)
  raise_not_initialized_error
end
add_state_machine(*) click to toggle source
# File lib/mocha/mockery.rb, line 19
def add_state_machine(*)
  raise_not_initialized_error
end
stubba() click to toggle source
# File lib/mocha/mockery.rb, line 23
def stubba
  Central::Null.new(&method(:raise_not_initialized_error))
end

Private Instance Methods

raise_not_initialized_error() click to toggle source
# File lib/mocha/mockery.rb, line 29
def raise_not_initialized_error
  message = 'Mocha methods cannot be used outside the context of a test'
  raise NotInitializedError.new(message, caller)
end