Skip to content

Commit f24e8b7

Browse files
committed
Enable RSpec/RepeatedExample
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 $ ```
1 parent 483e756 commit f24e8b7

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,3 +294,6 @@ RSpec/EmptyLineAfterSubject:
294294

295295
RSpec/ExcessiveDocstringSpacing:
296296
Enabled: true
297+
298+
RSpec/RepeatedExample:
299+
Enabled: true

spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -229,20 +229,6 @@ class ::TestPost < ActiveRecord::Base
229229
dump = ActiveRecord::Base.connection.structure_dump
230230
expect(dump).to match(/#{comment_sql}/)
231231
end
232-
233-
it "should dump table comments" do
234-
comment_sql = %Q(COMMENT ON TABLE "TEST_POSTS" IS 'Test posts with ''some'' "quotes"')
235-
@conn.execute comment_sql
236-
dump = ActiveRecord::Base.connection.structure_dump
237-
expect(dump).to match(/#{comment_sql}/)
238-
end
239-
240-
it "should dump column comments" do
241-
comment_sql = %Q(COMMENT ON COLUMN "TEST_POSTS"."TITLE" IS 'The title of the post with ''some'' "quotes"')
242-
@conn.execute comment_sql
243-
dump = ActiveRecord::Base.connection.structure_dump
244-
expect(dump).to match(/#{comment_sql}/)
245-
end
246232
end
247233

248234
describe "temporary tables" do

0 commit comments

Comments
 (0)