Skip to content

Commit

Permalink
Suppress RuboCop's offense
Browse files Browse the repository at this point in the history
Follow rubocop/rubocop#8707

This PR suppresses the following RuboCop's offense.

```console
% bundle exec rake
(snip)

Offenses:

spec/rubocop/cop/active_record_helper_spec.rb:6:3: W:
Lint/ConstantDefinitionInBlock: Do not define constants within a block.
  module RuboCop ...
    ^^^^^^^^^^^^^^

185 files inspected, 1 offense detected, 1 offense auto-correctable
RuboCop failed!
```
  • Loading branch information
koic committed Sep 13, 2020
1 parent c2d3ade commit c9af0b5
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions spec/rubocop/cop/active_record_helper_spec.rb
Expand Up @@ -3,16 +3,8 @@
RSpec.describe RuboCop::Cop::ActiveRecordHelper, :isolated_environment do
include FileHelper

module RuboCop
module Cop
class Example < Cop
include ActiveRecordHelper
end
end
end

let(:cop) do
RuboCop::Cop::Example.new
Class.new.extend RuboCop::Cop::ActiveRecordHelper
end

let(:schema_path) { 'db/schema.rb' }
Expand Down

0 comments on commit c9af0b5

Please sign in to comment.