diff --git a/spec/project_spec.rb b/spec/project_spec.rb index e7efaffa46..2b50ae0a0f 100644 --- a/spec/project_spec.rb +++ b/spec/project_spec.rb @@ -24,8 +24,8 @@ start_with_subject = description.match(/\AThis cop (?.+?) .*/) suggestion = start_with_subject[:verb]&.capitalize if start_with_subject suggestion ||= 'a verb' - expect(start_with_subject).to( - be_nil, "`Description` for `#{name}` should be started with `#{suggestion}` instead of `This cop ...`." + expect(start_with_subject.nil?).to( + be(true), "`Description` for `#{name}` should be started with `#{suggestion}` instead of `This cop ...`." ) end end