Pattern: Use of implicit subject
Issue: -
Checks for usage of implicit subject (is_expected
/should
).
This rule can be configured using the EnforcedStyle
option
# bad
it do
is_expected.to be_truthy
end
# good
it { is_expected.to be_truthy }
it do
expect(subject).to be_truthy
end
# bad
it { is_expected.to be_truthy }
# good
it { expect(subject).to be_truthy }
Name | Default value | Configurable values |
---|---|---|
EnforcedStyle | single_line_only |
single_line_only , single_statement_only , disallow |