Skip to content

Commit 96f32f2

Browse files
authored
Merge pull request #905 from ydah/fix-typo
Fix some typos
2 parents ab12e1f + 88089c3 commit 96f32f2

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

lib/rubocop/cop/rails/action_controller_flash_before_render.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def on_send(flash_node)
6767
private
6868

6969
def followed_by_render?(flash_node)
70-
flash_assigment_node = find_ancestor(flash_node, type: :send)
71-
context = flash_assigment_node
70+
flash_assignment_node = find_ancestor(flash_node, type: :send)
71+
context = flash_assignment_node
7272
if (node = context.each_ancestor(:if, :rescue).first)
7373
context = node
7474
elsif context.right_siblings.empty?

spec/rubocop/cop/rails/bulk_change_table_spec.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def change
2626
end
2727

2828
shared_examples 'no offense' do
29-
it 'does not register an offensewhen including combinable transformations' do
29+
it 'does not register an offense when including combinable transformations' do
3030
expect_no_offenses(<<~RUBY)
3131
def change
3232
change_table :users do |t|
@@ -37,7 +37,7 @@ def change
3737
RUBY
3838
end
3939

40-
it 'does not register an offensewhen including combinable alter methods' do
40+
it 'does not register an offense when including combinable alter methods' do
4141
expect_no_offenses(<<~RUBY)
4242
def change
4343
add_column :users, :name, :string, null: false
@@ -72,7 +72,7 @@ def change
7272
end
7373

7474
shared_examples 'no offense for mysql' do
75-
it 'does not register an offensewhen including combinable transformations' do
75+
it 'does not register an offense when including combinable transformations' do
7676
expect_no_offenses(<<~RUBY)
7777
def change
7878
change_table :users do |t|
@@ -83,7 +83,7 @@ def change
8383
RUBY
8484
end
8585

86-
it 'does not register an offensewhen including combinable alter methods' do
86+
it 'does not register an offense when including combinable alter methods' do
8787
expect_no_offenses(<<~RUBY)
8888
def change
8989
remove_index :users, :name
@@ -127,7 +127,7 @@ def change
127127
end
128128

129129
shared_examples 'no offense for postgresql' do
130-
it 'does not register an offensewhen including combinable transformations' do
130+
it 'does not register an offense when including combinable transformations' do
131131
expect_no_offenses(<<~RUBY)
132132
def change
133133
change_table :users do |t|
@@ -138,7 +138,7 @@ def change
138138
RUBY
139139
end
140140

141-
it 'does not register an offensewhen including combinable alter methods' do
141+
it 'does not register an offense when including combinable alter methods' do
142142
expect_no_offenses(<<~RUBY)
143143
def change
144144
change_column_default :users, :name, false
@@ -193,7 +193,7 @@ def change
193193
RUBY
194194
end
195195

196-
it 'does not register an offensewhen including combinable transformations with `bulk: true`' do
196+
it 'does not register an offense when including combinable transformations with `bulk: true`' do
197197
expect_no_offenses(<<~RUBY)
198198
def change
199199
change_table :users, bulk: true do |t|
@@ -204,7 +204,7 @@ def change
204204
RUBY
205205
end
206206

207-
it 'does not register an offensewhen including combinable transformations with `bulk: false`' do
207+
it 'does not register an offense when including combinable transformations with `bulk: false`' do
208208
expect_no_offenses(<<~RUBY)
209209
def change
210210
change_table :users, bulk: false do |t|
@@ -215,7 +215,7 @@ def change
215215
RUBY
216216
end
217217

218-
it 'does not register an offensewhen including a combinable transformation' do
218+
it 'does not register an offense when including a combinable transformation' do
219219
expect_no_offenses(<<~RUBY)
220220
def change
221221
change_table :users do |t|
@@ -252,7 +252,7 @@ def change
252252
RUBY
253253
end
254254

255-
it 'does not register an offensewhen including transformations with block' do
255+
it 'does not register an offense when including transformations with block' do
256256
expect_no_offenses(<<~RUBY)
257257
def change
258258
reversible do |dir|
@@ -272,7 +272,7 @@ def change
272272
RUBY
273273
end
274274

275-
it 'does not register an offensewhen the target of the alter method is another table' do
275+
it 'does not register an offense when the target of the alter method is another table' do
276276
expect_no_offenses(<<~RUBY)
277277
def change
278278
add_reference :users, :team
@@ -282,7 +282,7 @@ def change
282282
RUBY
283283
end
284284

285-
it 'does not register an offensewhen including non-combinable alter method between' do
285+
it 'does not register an offense when including non-combinable alter method between' do
286286
expect_no_offenses(<<~RUBY)
287287
def change
288288
add_column :users, :name, :string, null: false
@@ -304,7 +304,7 @@ def change
304304
RUBY
305305
end
306306

307-
it 'does not register an offensewhen including a combinable alter method' do
307+
it 'does not register an offense when including a combinable alter method' do
308308
expect_no_offenses(<<~RUBY)
309309
def change
310310
add_reference :users, :team

spec/rubocop/cop/rails/file_path_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
end
140140
end
141141

142-
context 'when concat Rails.root and colon using string interpoloation' do
142+
context 'when concat Rails.root and colon using string interpolation' do
143143
it 'does not register an offense' do
144144
expect_no_offenses(<<~'RUBY')
145145
"#{Rails.root}:/foo/bar"
@@ -268,7 +268,7 @@
268268
end
269269
end
270270

271-
context 'when concat Rails.root and colon using string interpoloation' do
271+
context 'when concat Rails.root and colon using string interpolation' do
272272
it 'does not register an offense' do
273273
expect_no_offenses(<<~'RUBY')
274274
"#{Rails.root}:/foo/bar"

spec/rubocop/cop/rails/pluck_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
context 'when the block argument is used in `[]`' do
5454
it 'does not register an offense' do
5555
expect_no_offenses(<<~RUBY)
56-
x.#{method} { |a| a[foo...a.to_someghing] }
56+
x.#{method} { |a| a[foo...a.to_something] }
5757
RUBY
5858
end
5959
end
@@ -93,7 +93,7 @@
9393
context 'when the numblock argument is used in `[]`' do
9494
it 'does not register an offense' do
9595
expect_no_offenses(<<~RUBY)
96-
x.#{method} { _1[foo..._1.to_someghing] }
96+
x.#{method} { _1[foo..._1.to_something] }
9797
RUBY
9898
end
9999
end

spec/rubocop/cop/rails/redundant_receiver_in_with_options_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class Account < ApplicationRecord
9797
RUBY
9898
end
9999

100-
it 'does not register an offense when including block nodein `with_options`' do
100+
it 'does not register an offense when including block node in `with_options`' do
101101
expect_no_offenses(<<~RUBY)
102102
with_options options: false do |merger|
103103
merger.invoke

0 commit comments

Comments
 (0)