diff --git a/lib/rubocop/cop/rails/enum_hash.rb b/lib/rubocop/cop/rails/enum_hash.rb index b99b8edecd..04d4a86d4e 100644 --- a/lib/rubocop/cop/rails/enum_hash.rb +++ b/lib/rubocop/cop/rails/enum_hash.rb @@ -20,8 +20,7 @@ module Rails class EnumHash < Base extend AutoCorrector - MSG = 'Enum defined as an array found in `%s` enum declaration. '\ - 'Use hash syntax instead.' + MSG = 'Enum defined as an array found in `%s` enum declaration. Use hash syntax instead.' RESTRICT_ON_SEND = %i[enum].freeze def_node_matcher :enum?, <<~PATTERN diff --git a/lib/rubocop/cop/rails/order_by_id.rb b/lib/rubocop/cop/rails/order_by_id.rb index a4090b8d3d..f592582152 100644 --- a/lib/rubocop/cop/rails/order_by_id.rb +++ b/lib/rubocop/cop/rails/order_by_id.rb @@ -23,8 +23,7 @@ module Rails class OrderById < Base include RangeHelp - MSG = 'Do not use the `id` column for ordering. '\ - 'Use a timestamp column to order chronologically.' + MSG = 'Do not use the `id` column for ordering. Use a timestamp column to order chronologically.' RESTRICT_ON_SEND = %i[order].freeze def_node_matcher :order_by_id?, <<~PATTERN diff --git a/spec/rubocop/cop/rails/schema_comment_spec.rb b/spec/rubocop/cop/rails/schema_comment_spec.rb index 3be3909974..8a9565cdfe 100644 --- a/spec/rubocop/cop/rails/schema_comment_spec.rb +++ b/spec/rubocop/cop/rails/schema_comment_spec.rb @@ -36,8 +36,7 @@ RUBY end - it 'does not register an offense when `add_column` has `comment` option'\ - 'among other options' do + it 'does not register an offense when `add_column` has `comment` option among other options' do expect_no_offenses(<<~RUBY) add_column :table, :column, :integer, null: false, comment: 'An integer field', default: 0 RUBY @@ -96,8 +95,7 @@ RUBY end - it 'does not register an offense when `t.column` has `comment` option' \ - 'among other options' do + it 'does not register an offense when `t.column` has `comment` option among other options' do expect_no_offenses(<<~RUBY) create_table :users, comment: 'Table' do |t| t.column :column, :integer, default: nil, comment: 'I am a column', null: true @@ -105,8 +103,7 @@ RUBY end - it 'does not register an offense when `t.integer` has `comment` option'\ - 'among other options' do + it 'does not register an offense when `t.integer` has `comment` option among other options' do expect_no_offenses(<<~RUBY) create_table :users, comment: 'Table' do |t| t.integer :column, default: nil, comment: 'I am a column', null: true