Module RSpec::Mocks::Syntax
In: lib/rspec/mocks/syntax.rb

@api private Provides methods for enabling and disabling the available syntaxes provided by rspec-mocks.

Methods

Public Class methods

@api private Determines where the methods like `should_receive`, and `stub` are added.

@api private Disables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc).

@api private Disables the should syntax (`dbl.stub`, `dbl.should_receive`, etc).

@api private Enables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc).

@api private Enables the should syntax (`dbl.stub`, `dbl.should_receive`, etc).

@api private Indicates whether or not the expect syntax is enabled.

@api private Indicates whether or not the should syntax is enabled.

@api private

Common stubbing logic for both `stub` and `stub!`. This used to live in `stub`, and `stub!` delegated to `stub`, but we discovered that `stub!` was delegating to `RSpec::Mocks::ExampleMethods#stub` (which declares a test double) when called with an implicit receiver, which was a regression in 2.14.0.

Public Instance methods

[Validate]