Skip to content

Commit e7d4996

Browse files
Remove extra blank lines around block bodies (#1562)
Co-authored-by: Matheus Oliveira <[email protected]>
1 parent 541af5e commit e7d4996

File tree

12 files changed

+3
-18
lines changed

12 files changed

+3
-18
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Layout/EmptyLineBetweenDefs:
1818
Layout/EmptyLines:
1919
Enabled: true
2020

21+
Layout/EmptyLinesAroundBlockBody:
22+
Enabled: true
23+
2124
Layout/FirstArrayElementIndentation:
2225
EnforcedStyle: consistent
2326

spec/polyamorous/join_association_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module Polyamorous
44
describe JoinAssociation do
5-
65
let(:join_dependency) { new_join_dependency Note, {} }
76
let(:reflection) { Note.reflect_on_association(:notable) }
87
let(:parent) { join_dependency.send(:join_root) }

spec/polyamorous/join_dependency_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module Polyamorous
44
describe JoinDependency do
5-
65
context 'with symbol joins' do
76
subject { new_join_dependency Person, articles: :comments }
87

spec/ransack/adapters/active_record/base_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module Ransack
44
module Adapters
55
module ActiveRecord
66
describe Base do
7-
87
subject { ::ActiveRecord::Base }
98

109
it { should respond_to :ransack }
@@ -124,7 +123,6 @@ module ActiveRecord
124123
expect(s.result.to_sql).to (include rails7_and_mysql ? %q{age > '0'} : 'age > 0')
125124
end
126125
end
127-
128126
end
129127

130128
it 'does not raise exception for string :params argument' do

spec/ransack/adapters/active_record/context_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ module ActiveRecord
140140
expect(attribute.relation.name).to eq 'articles'
141141
expect(attribute.relation.table_alias).to be_nil
142142
end
143-
144143
end
145144
end
146145
end

spec/ransack/helpers/form_builder_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
module Ransack
44
module Helpers
55
describe FormBuilder do
6-
76
router = ActionDispatch::Routing::RouteSet.new
87
router.draw do
98
resources :people, :comments, :notes
@@ -165,7 +164,6 @@ def test_label(f, query, expected)
165164
def date_select_html(val)
166165
%(<option value="#{val}" selected="selected">#{val}</option>)
167166
end
168-
169167
end
170168
end
171169
end

spec/ransack/helpers/form_helper_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
module Ransack
44
module Helpers
55
describe FormHelper do
6-
76
router = ActionDispatch::Routing::RouteSet.new
87
router.draw do
98
resources :people, :notes
@@ -458,9 +457,7 @@ module Helpers
458457
end
459458

460459
context 'view has existing parameters' do
461-
462460
describe '#sort_link should not remove existing params' do
463-
464461
before { @controller.view_context.params[:exist] = 'existing' }
465462

466463
subject {
@@ -478,7 +475,6 @@ module Helpers
478475
end
479476

480477
describe '#sort_url should not remove existing params' do
481-
482478
before { @controller.view_context.params[:exist] = 'existing' }
483479

484480
subject {
@@ -496,7 +492,6 @@ module Helpers
496492
end
497493

498494
context 'using a real ActionController::Parameter object' do
499-
500495
describe 'with symbol q:, #sort_link should include search params' do
501496
subject { @controller.view_context.sort_link(Person.ransack, :name) }
502497
let(:params) { ActionController::Parameters.new(

spec/ransack/nodes/grouping_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
module Ransack
44
module Nodes
55
describe Grouping do
6-
76
before do
87
@g = 1
98
end
@@ -107,7 +106,6 @@ module Nodes
107106
end
108107
end
109108
end
110-
111109
end
112110
end
113111
end

spec/ransack/nodes/value_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ module Nodes
109109
end
110110
end
111111
end
112-
113112
end
114113
end
115114
end

spec/ransack/predicate_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module Ransack
55
FALSE_VALUES = [false, 0, '0', 'f', 'F', 'false', 'FALSE'].to_set
66

77
describe Predicate do
8-
98
before do
109
@s = Search.new(Person)
1110
end

0 commit comments

Comments
 (0)