Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cop idea: Negative be_valid matcher #1660

Closed
ydakuka opened this issue Jun 10, 2023 · 0 comments · Fixed by #1665
Closed

Cop idea: Negative be_valid matcher #1660

ydakuka opened this issue Jun 10, 2023 · 0 comments · Fixed by #1665

Comments

@ydakuka
Copy link

ydakuka commented Jun 10, 2023

Actual behavior

I have the code:

RSpec.describe AdvertForm, type: :model do
  subject(:form) { described_class.new }

  specify do
    expect(form).not_to be_valid
  end
end

I run rubocop:

ydakuka@yauhenid:~/Work/project$ bin/rails_docker rubocop spec/forms/advert_form_spec.rb
Inspecting 1 file
.

1 file inspected, no offenses detected

Expected behavior

I expected to receive the following code:

RSpec.describe AdvertForm, type: :model do
  subject(:form) { described_class.new }

  specify do
    expect(form).to be_invalid
  end
end
ydah added a commit that referenced this issue Jun 18, 2023
ydah added a commit that referenced this issue Jul 20, 2023
ydah added a commit that referenced this issue Jul 20, 2023
ydah added a commit to rubocop/rubocop-rspec_rails that referenced this issue Mar 27, 2024
ydah added a commit to rubocop/rubocop-rspec_rails that referenced this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants