rubocop-rspec icon indicating copy to clipboard operation
rubocop-rspec copied to clipboard

Code style checking for RSpec files

Results 163 rubocop-rspec issues
Sort by recently updated
recently updated
newest added

Details: - rubocop-rspec version: 1.43.2 (all versions >= 1.39.0 affected) - Rubocop version: 0.92.0 Related issue with vscode-ruby: https://github.com/rubyide/vscode-ruby/issues/625 --- The RSpec/FilePath cop does not work with [vscode-ruby](https://github.com/rubyide/vscode-ruby). It causes...

```rb Capybara.exact = true expect(page).to have_link(exact_text: 'foobar') ``` It would be nice to have a check that disallows passing `exact_text` to such matchers as that's unneeded - `Capybara.exact` makes these...

```rb find('#some-id a.some-class').click ``` This could be changed to: ```rb find('#some-id').click_link(class: 'some-class') # or find_by_id('some-id').click_link(class: 'some-class') ``` I'm still not sure if that's better but I wanted to put that...

Note the following code: ```rb visit 'google.com' expect(page).to have_no_link ``` Will pass... sometimes. It's a race-condition as the page may or may not have loaded when execution reaches the second...

is that a wanted behavior that when I declare an instance variable, this cop registers an offense? example: ```rb it "does something" do create(:questionnaire) do |questionnaire| @answers = create_list(:answer, 4)...

## context This was already discussed here: https://github.com/rubocop/rubocop-rspec/pull/632#issuecomment-415967045 ## The issue ### what we have today: If I have ```rb context "given 1, 2, 3" do before { do_something }...

Fixes https://github.com/rubocop/rubocop-rspec/issues/740. Implementation is based on the suggestion in this comment: https://github.com/rubocop/rubocop-rspec/issues/740#issuecomment-462932812. This is especially useful for Rails applications (or any application using ActiveSupport inflections) that define mixed-case custom acronyms,...

As [mentioned in the last release PR](https://github.com/rubocop/rubocop-rspec/pull/1242#issuecomment-1054001111), it’s over a year since we released v2.0.0. Let’s enable all the pending cops and make a v3.0.0 release soon 🎉 --- Before...

I've seen specs that just reference `let` in `before` to trigger the record creation ``` let(:something) { create :record } before { something } ``` The same should be either...

cop

```ruby # `email_spec.rb` or whatever Mail.new do subject 'This is a test email' end ``` which is `mail` gem DSL for creating new emails, leads to ``` $ rubocop -rrubocop-rspec...

bug