| 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.
@api private Determines where the methods like `should_receive`, and `stub` are added.
@api private Indicates whether or not the expect 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.