class RuboCop::Cop::RSpec::BeNil

Ensures a consistent style is used when matching ‘nil`.

You can either use the more specific ‘be_nil` matcher, or the more generic `be` matcher with a `nil` argument.

This cop can be configured using the ‘EnforcedStyle` option

@example ‘EnforcedStyle: be_nil` (default)

# bad
expect(foo).to be(nil)

# good
expect(foo).to be_nil

@example ‘EnforcedStyle: be`

# bad
expect(foo).to be_nil

# good
expect(foo).to be(nil)