Skip to content

Commit 541af5e

Browse files
Add blank lines after last let in RSpec examples (#1563)
1 parent 9c66f49 commit 541af5e

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

.rubocop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
plugins:
2+
- rubocop-rspec
3+
14
AllCops:
25
TargetRubyVersion: 3.0
36

@@ -33,6 +36,9 @@ Layout/SpaceInsideParens:
3336
Layout/TrailingEmptyLines:
3437
Enabled: true
3538

39+
RSpec/EmptyLineAfterFinalLet:
40+
Enabled: true
41+
3642
Style/HashSyntax:
3743
Enabled: true
3844

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ group :test do
5656
end
5757

5858
gem 'rubocop', require: false
59+
gem 'rubocop-rspec', require: false

spec/ransack/helpers/form_helper_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ module Helpers
502502
let(:params) { ActionController::Parameters.new(
503503
{ q: { name_eq: 'TEST' }, controller: 'people' }
504504
) }
505+
505506
before { @controller.instance_variable_set(:@params, params) }
506507

507508
it {
@@ -517,6 +518,7 @@ module Helpers
517518
let(:params) { ActionController::Parameters.new(
518519
{ q: { name_eq: 'TEST' }, controller: 'people' }
519520
) }
521+
520522
before { @controller.instance_variable_set(:@params, params) }
521523

522524
it {
@@ -533,6 +535,7 @@ module Helpers
533535
ActionController::Parameters.new(
534536
{ 'q' => { name_eq: 'Test2' }, controller: 'people' }
535537
) }
538+
536539
before { @controller.instance_variable_set(:@params, params) }
537540

538541
it {
@@ -549,6 +552,7 @@ module Helpers
549552
ActionController::Parameters.new(
550553
{ 'q' => { name_eq: 'Test2' }, controller: 'people' }
551554
) }
555+
552556
before { @controller.instance_variable_set(:@params, params) }
553557

554558
it {

spec/ransack/nodes/grouping_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ module Nodes
6666
}
6767
}
6868
end
69+
6970
before { subject.conditions = conditions }
7071

7172
it 'expect duplicates to be removed' do
@@ -98,6 +99,7 @@ module Nodes
9899
}
99100
}
100101
end
102+
101103
before { subject.conditions = conditions }
102104

103105
it 'expect them to be parsed as different and not as duplicates' do

spec/ransack/search_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ module Ransack
349349
let(:notable_type_field) {
350350
"#{quote_table_name("notes")}.#{quote_column_name("notable_type")}"
351351
}
352+
352353
it 'evaluates conditions contextually' do
353354
s = Search.new(Person, children_name_eq: 'Ernie')
354355
expect(s.result).to be_an ActiveRecord::Relation

0 commit comments

Comments
 (0)