Class: Mocha::Configuration

Class | Mocha::Configuration
In: | lib/mocha/configuration.rb
Parent: | Object

Configuration settings

### Methods

allow prevent warn_when

### Constants

DEFAULTS | = | { :stubbing_method_unnecessarily => :allow, :stubbing_method_on_non_mock_object => :allow, :stubbing_non_existent_method => :allow, :stubbing_non_public_method => :allow }

### Public Class methods

allow(action)

Allow the specified `action` (as a symbol). The `actions` currently available are `:stubbing_method_unnecessarily, :stubbing_method_on_non_mock_object, :stubbing_non_existent_method, :stubbing_non_public_method`.

prevent(action)

Raise a StubbingError if the specified `action` (as a symbol) is attempted. The `actions` currently available are `:stubbing_method_unnecessarily, :stubbing_method_on_non_mock_object, :stubbing_non_existent_method, :stubbing_non_public_method`.

warn_when(action)

Warn if the specified `action` (as a symbol) is attempted. The `actions` currently available are `:stubbing_method_unnecessarily, :stubbing_method_on_non_mock_object, :stubbing_non_existent_method, :stubbing_non_public_method`.

[Validate]