class RSpec::Mocks::Configuration

Provides configuration options for rspec-mocks.

def add_stub_and_should_receive_to(*modules)


end
end
mocks.add_stub_and_should_receive_to Delegator
rspec.mock_with :rspec do |mocks|
RSpec.configure do |rspec|

@example

the process.
methods and remove `stub` and `should_receive` in
"strip themselves down" to a bare minimum set of
if you application uses some proxy classes that
modules or classes. This is usually only necessary
Adds `stub` and `should_receive` to the given
def add_stub_and_should_receive_to(*modules)
  modules.each do |mod|
    Syntax.enable_should(mod)
  end
end

def initialize

def initialize
  @yield_receiver_to_any_instance_implementation_blocks = true
  @verify_doubled_constant_names = false
  @transfer_nested_constants = false
  @verify_partial_doubles = false
end

def patch_marshal_to_support_partial_doubles=(val)

This method is idempotent.

the patch.
these singleton methods before serialization. Setting to falsey removes
adding singleton methods that cannot be serialized. This patch removes
objects. By default this will not work since RSpec mocks works by
Monkey-patch `Marshal.dump` to enable dumping of mocked or stubbed
def patch_marshal_to_support_partial_doubles=(val)
  if val
    RSpec::Mocks::MarshalExtension.patch!
  else
    RSpec::Mocks::MarshalExtension.unpatch!
  end
end

def reset_syntaxes_to_default

Other tags:
    Api: - private
def reset_syntaxes_to_default
  self.syntax = [:should, :expect]
  RSpec::Mocks::Syntax.warn_about_should!
end

def syntax


end
raise "this RSpec extension gem requires the rspec-mocks `:expect` syntax"
unless RSpec::Mocks.configuration.syntax.include?(:expect)

@example

that are enabled.
Returns an array with a list of syntaxes
def syntax
  syntaxes = []
  syntaxes << :should  if Syntax.should_enabled?
  syntaxes << :expect if Syntax.expect_enabled?
  syntaxes
end

def syntax=(*values)


end
end
mocks.syntax = [:expect, :should]
rspec.mock_with :rspec do |mocks|
RSpec.configure do |rspec|

@example

disable `expect` syntax.
explicitly enable `should` syntax and/or explicitly
syntax by default. This is needed if you want to
`should` or both syntaxes. RSpec uses `expect`
Provides the ability to set either `expect`,
def syntax=(*values)
  syntaxes = values.flatten
  if syntaxes.include?(:expect)
    Syntax.enable_expect
  else
    Syntax.disable_expect
  end
  if syntaxes.include?(:should)
    Syntax.enable_should
  else
    Syntax.disable_should
  end
end

def transfer_nested_constants=(val)

stubbing constants.
Sets the default for the `transfer_nested_constants` option when
def transfer_nested_constants=(val)
  @transfer_nested_constants = val
end

def transfer_nested_constants?

def transfer_nested_constants?
  !!@transfer_nested_constants
end

def verify_doubled_constant_names=(val)

isolated unit test will prevent you from being able to isolate it!
test suite, with all production code loaded. Setting this for an
constant. You probably only want to set this when running your entire
`instance_double` or `class_double` is given the name of an undefined
When this is set to true, an error will be raised when
def verify_doubled_constant_names=(val)
  @verify_doubled_constant_names = val
end

def verify_doubled_constant_names?

def verify_doubled_constant_names?
  !!@verify_doubled_constant_names
end

def verify_partial_doubles=(val)

method, and methods that do not exist cannot be stubbed.
doubles. Any stubs will have their arguments checked against the original
When set to true, partial mocks will be verified the same as object
def verify_partial_doubles=(val)
  @verify_partial_doubles = !!val
end

def verify_partial_doubles?

def verify_partial_doubles?
  @verify_partial_doubles
end

def yield_receiver_to_any_instance_implementation_blocks=(arg)

end
end
mocks.yield_receiver_to_any_instance_implementation_blocks = false
rspec.mock_with :rspec do |mocks|
RSpec.configure do |rspec|

@example

Defaults to `true`.
When set, the first yielded argument will be the receiving instance.
message to blocks that are used for any_instance stub implementations.
Sets whether or not RSpec will yield the receiving instance of a
def yield_receiver_to_any_instance_implementation_blocks=(arg)
  @yield_receiver_to_any_instance_implementation_blocks = arg
end

def yield_receiver_to_any_instance_implementation_blocks?

def yield_receiver_to_any_instance_implementation_blocks?
  @yield_receiver_to_any_instance_implementation_blocks
end