Pattern: Missing spy use for message expectation
Issue: -
Checks that message expectations are set using spies.
This rule can be configured in your configuration using the EnforcedStyle
option.
# bad
expect(foo).to receive(:bar)
# good
expect(foo).to have_received(:bar)
# bad
expect(foo).to have_received(:bar)
# good
expect(foo).to receive(:bar)
Name | Default value | Configurable values |
---|---|---|
EnforcedStyle | have_received |
have_received , receive |