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

## Summary I would like to achieve the following 2 things for `RSpec/FilePath`. I am willing to implement the solution when we reach an agreement on this issue. ### Avoid...

enhancement

When using `include_examples` a new RSpec context is _not_ created, unlike with `it_behaves_like`. It is a common mistake to write something like: ```ruby include_examples 'my thing' do let(:a) { 'a')...

cop

I would like to restrict tags, which can be used in blocks: ``` describe 'some test', type: feature, driver: :chrome, js: true, vcr: { record: :new_episodes } do ``` `feature...

A block such as `it "..." do` containing a very long description string is likely a sign that either the test or the implementation is too complex.

It'd be nice if we had some repo about the best RSpec practices rubocop-rspec is enforcing. Right now it's a bit unclear where are some of the rules originating from...

We currently have over 3,000 violations over in the core repo. Mostly because this cop doesn't care about our internal DSLs. 🙂 One approach to fixing this could be counting...

See https://github.com/rubocop-hq/rubocop-rspec/issues/388#issuecomment-395185778 Beyond having one relatively complicated rspec file, if we also pull in popular OSS projects that use RSpec, we can catch even more bugs before they happen. As...

enhancement
maintenance

This cost me a large amount of debugging time and frustration. See misc. discussion in #645. Fortunately we use these very rarely, but I think it would be better if...

enhancement
maintenance

Since example wordings are composed together for error messages, documentation and so on, I think it makes sense that they don't start with uppercase letters, except for the outermost block....

I looked at the [code coverage report](https://codeclimate.com/github/rubocop-rspec/rubocop-rspec/lib/rubocop/cop/rspec/predicate_matcher.rb/source), and it looks like we have a couple of lines of untested code: https://github.com/rubocop-rspec/rubocop-rspec/blob/014a2001f46ddb62e3bddf0651735ff17459e434/lib/rubocop/cop/rspec/predicate_matcher.rb#L234-L235 I tried to add a spec that would exercise...