Skip to content

Files

Latest commit

 

History

History
41 lines (27 loc) · 909 Bytes

RSpec-ImplicitExpect.md

File metadata and controls

41 lines (27 loc) · 909 Bytes

Pattern: Inconsistent implicit expectation

Issue: -

Description

Checks that a consistent implicit expectation style is used.

This rule can be configured using the EnforcedStyle option.

Examples

EnforcedStyle: is_expected

# bad
it { should be_truthy }

# good
it { is_expected.to be_truthy }

EnforcedStyle: should

# bad
it { is_expected.to be_truthy }

# good
it { should be_truthy }

Configurable attributes

Name Default value Configurable values
EnforcedStyle is_expected is_expected, should

Further Reading