Skip to content

Commit fd69f79

Browse files
committed
Suppress new Style/RedundantHeredocDelimiterQuotes cop's offenses
Follow up rubocop/rubocop#11528. This commit suppresses the following new `Style/RedundantHeredocDelimiterQuotes` cop's offenses: ```console % bundle exec rake (snip) Offenses: spec/rubocop/cop/rails/helper_instance_variable_spec.rb:31:24: C: [Correctable] Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<~RUBY instead. expect_no_offenses(<<~'RUBY') ^^^^^^^^^ spec/rubocop/cop/rails/helper_instance_variable_spec.rb:39:24: C: [Correctable] Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<~RUBY instead. expect_no_offenses(<<~'RUBY') ^^^^^^^^^ spec/rubocop/cop/rails/helper_instance_variable_spec.rb:50:24: C: [Correctable] Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<~RUBY instead. expect_no_offenses(<<~'RUBY') ^^^^^^^^^ spec/rubocop/cop/rails/helper_instance_variable_spec.rb:61:20: C: [Correctable] Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<~RUBY instead. expect_offense(<<~'RUBY') ^^^^^^^^^ spec/rubocop/cop/rails/match_route_spec.rb:110:24: C: [Correctable] Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<~RUBY instead. expect_no_offenses(<<~'RUBY') ^^^^^^^^^ spec/rubocop/cop/rails/reflection_class_name_spec.rb:57:24: C: [Correctable] Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<~RUBY instead. expect_no_offenses(<<~'RUBY') ^^^^^^^^^ spec/rubocop/cop/rails/reflection_class_name_spec.rb:63:24: C: [Correctable] Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<~RUBY instead. expect_no_offenses(<<~'RUBY') ^^^^^^^^^ spec/rubocop/cop/rails/root_pathname_methods_spec.rb:123:22: C: [Correctable] Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<~RUBY instead. expect_offense(<<~'RUBY') ^^^^^^^^^ 279 files inspected, 8 offenses detected, 8 offenses autocorrectable ```
1 parent d6a39e9 commit fd69f79

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

spec/rubocop/cop/rails/helper_instance_variable_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ def welcome_message(user)
2828
end
2929

3030
it 'does not register an offense when using memoization' do
31-
expect_no_offenses(<<~'RUBY')
31+
expect_no_offenses(<<~RUBY)
3232
def foo
3333
@cache ||= heavy_load
3434
end
3535
RUBY
3636
end
3737

3838
it 'does not register an offense when a class which inherits `ActionView::Helpers::FormBuilder`' do
39-
expect_no_offenses(<<~'RUBY')
39+
expect_no_offenses(<<~RUBY)
4040
class MyFormBuilder < ActionView::Helpers::FormBuilder
4141
def do_something
4242
@template
@@ -47,7 +47,7 @@ def do_something
4747
end
4848

4949
it 'does not register an offense when a class which inherits `::ActionView::Helpers::FormBuilder`' do
50-
expect_no_offenses(<<~'RUBY')
50+
expect_no_offenses(<<~RUBY)
5151
class MyFormBuilder < ::ActionView::Helpers::FormBuilder
5252
def do_something
5353
@template
@@ -58,7 +58,7 @@ def do_something
5858
end
5959

6060
it 'registers an offense when using a class which does not inherit `ActionView::Helpers::FormBuilder`' do
61-
expect_offense(<<~'RUBY')
61+
expect_offense(<<~RUBY)
6262
class Foo
6363
def do_something
6464
@template

spec/rubocop/cop/rails/match_route_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
end
108108

109109
it 'does not register an offense when via is a variable' do
110-
expect_no_offenses(<<~'RUBY')
110+
expect_no_offenses(<<~RUBY)
111111
routes.draw do
112112
match ':controller/:action/:id', via: method
113113
end

spec/rubocop/cop/rails/reflection_class_name_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
end
5555

5656
it 'does not register an offense when using `class_name: do_something.to_s`' do
57-
expect_no_offenses(<<~'RUBY')
57+
expect_no_offenses(<<~RUBY)
5858
has_many :accounts, class_name: do_something.to_s
5959
RUBY
6060
end
6161

6262
it 'does not register an offense when using `class_name: to_s`' do
63-
expect_no_offenses(<<~'RUBY')
63+
expect_no_offenses(<<~RUBY)
6464
has_many :accounts, class_name: to_s
6565
RUBY
6666
end

spec/rubocop/cop/rails/root_pathname_methods_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
end
121121

122122
it 'registers an offense when using `Rails.env` argument within `Dir.glob`' do
123-
expect_offense(<<~'RUBY')
123+
expect_offense(<<~RUBY)
124124
Dir.glob(Rails.root.join("db", "seeds", Rails.env, "*.rb")).sort.each do |file|
125125
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rails.root` is a `Pathname` so you can just append `#glob`.
126126
load file

0 commit comments

Comments
 (0)