Skip to content

Conversation

yahonda
Copy link
Collaborator

@yahonda yahonda commented Mar 14, 2022

This cop actually finds the actual repeated examples below. So let's
remove them.

$ bundle exec rubocop
Inspecting 72 files
....................................................C...................

Offenses:

spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb:219:5: C: RSpec/RepeatedExample: Don't repeat examples within an example group.
    it "should dump table comments" do ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb:226:5: C: RSpec/RepeatedExample: Don't repeat examples within an example group.
    it "should dump column comments" do ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb:233:5: C: RSpec/RepeatedExample: Don't repeat examples within an example group.
    it "should dump table comments" do ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb:240:5: C: RSpec/RepeatedExample: Don't repeat examples within an example group.
    it "should dump column comments" do ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

72 files inspected, 4 offenses detected
$

@yahonda yahonda changed the title Enable RSpec/RepeatedExample Enable RSpec/RepeatedExample cop Mar 14, 2022
This cop actually finds the actual repeated examples below. So let's
remove them.

```ruby
$ bundle exec rubocop
Inspecting 72 files
....................................................C...................

Offenses:

spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb:219:5: C: RSpec/RepeatedExample: Don't repeat examples within an example group.
    it "should dump table comments" do ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb:226:5: C: RSpec/RepeatedExample: Don't repeat examples within an example group.
    it "should dump column comments" do ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb:233:5: C: RSpec/RepeatedExample: Don't repeat examples within an example group.
    it "should dump table comments" do ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb:240:5: C: RSpec/RepeatedExample: Don't repeat examples within an example group.
    it "should dump column comments" do ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

72 files inspected, 4 offenses detected
$
```
@yahonda yahonda force-pushed the remove_redundant_cop branch from f24e8b7 to f4af832 Compare March 14, 2022 09:43
@yahonda yahonda requested a review from koic March 14, 2022 09:45
@koic koic merged commit c2d6c7d into rsim:master Mar 14, 2022
@koic
Copy link
Collaborator

koic commented Mar 14, 2022

Nice improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants