Skip to content

Commit

Permalink
Suppress an offense for rails/presence_spec.rb
Browse files Browse the repository at this point in the history
This PR suppresses the following offense for rails/presence_spec.rb.

```console
% bundle exec rake
(snip)

Offenses:

spec/rubocop/cop/rails/presence_spec.rb:70:66: W:
Lint/UnneededCopDisableDirective: Unnecessary disabling of
Metrics/LineLength.
  it_behaves_like 'offense', <<~RUBY.chomp, <<~FIXED.chomp, 1, 7
  # rubocop:disable Metrics/LineLength
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

126 files inspected, 1 offense detected
RuboCop failed!
```

https://circleci.com/gh/rubocop-hq/rubocop-rails/1721
  • Loading branch information
koic committed Oct 21, 2019
1 parent 4a16f2c commit f63afc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/rubocop/cop/rails/presence_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

it_behaves_like 'offense', 'a if a.present?', 'a.presence', 1, 1
it_behaves_like 'offense', 'a unless a.blank?', 'a.presence', 1, 1
it_behaves_like 'offense', <<~RUBY.chomp, <<~FIXED.chomp, 1, 7 # rubocop:disable Metrics/LineLength
it_behaves_like 'offense', <<~RUBY.chomp, <<~FIXED.chomp, 1, 7
if [1, 2, 3].map { |num| num + 1 }
.map { |num| num + 2 }
.present?
Expand Down

0 comments on commit f63afc0

Please sign in to comment.