Skip to content

Files

Latest commit

 

History

History
41 lines (27 loc) · 918 Bytes

RSpec-MessageExpectation.md

File metadata and controls

41 lines (27 loc) · 918 Bytes

Pattern: Inconsistent message expectation

Issue: -

Description

Checks for consistent message expectation style.

This rule can be configured in your configuration using the EnforcedStyle option.

Examples

EnforcedStyle: allow

# bad
expect(foo).to receive(:bar)

# good
allow(foo).to receive(:bar)

EnforcedStyle: expect

# bad
allow(foo).to receive(:bar)

# good
expect(foo).to receive(:bar)

Configurable attributes

Name Default value Configurable values
EnforcedStyle allow allow, expect

Further Reading