Skip to content

RSpecRails/NegationBeValid does not match "to_not" #70

@brianclinkenbeard

Description

@brianclinkenbeard

With a preference of

RSpec/NotToNot:
  EnforcedStyle: to_not

RSpecRails/NegationBeValid:
  EnforcedStyle: be_invalid

code like

it { is_expected.to_not be_valid }

does not trip. Changing to

it { is_expected.not_to be_valid }

causes the offense to be caught and for .to be_invalid to be suggested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions