Skip to content

Commit

Permalink
Enable Layout/LineContinuationSpacing
Browse files Browse the repository at this point in the history
...and fix offenses.
  • Loading branch information
bquorning committed Oct 13, 2022
1 parent 4a05fd3 commit adbc170
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ Style/FormatStringToken:
Exclude:
- spec/rubocop/**/*.rb

# Enable some of RuboCop's pending cops.

Layout/LineContinuationSpacing:
Enabled: true

# Enable our own pending cops.

RSpec/BeEq:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
RUBY
end

it 'flags a missing empty line after a `rubocop:enable` directive '\
it 'flags a missing empty line after a `rubocop:enable` directive ' \
'when it is followed by a `rubocop:disable` directive' do
expect_offense(<<-RUBY)
RSpec.describe Foo do
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/rspec/empty_line_after_example_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
RUBY
end

it 'flags a missing empty line after a `rubocop:enable` directive '\
it 'flags a missing empty line after a `rubocop:enable` directive ' \
'when it is followed by a `rubocop:disable` directive' do
expect_offense(<<-RUBY)
RSpec.describe Foo do
Expand Down
4 changes: 2 additions & 2 deletions spec/rubocop/cop/rspec/empty_line_after_final_let_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
RUBY
end

it 'does not register an offense for comment '\
it 'does not register an offense for comment ' \
'followed by an empty line after let' do
expect_no_offenses(<<-RUBY)
RSpec.describe User do
Expand Down Expand Up @@ -183,7 +183,7 @@
RUBY
end

it 'flags a missing empty line after a `rubocop:enable` directive '\
it 'flags a missing empty line after a `rubocop:enable` directive ' \
'when it is followed by a `rubocop:disable` directive' do
expect_offense(<<-RUBY)
RSpec.describe User do
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/rspec/empty_line_after_hook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
RUBY
end

it 'flags a missing empty line after a `rubocop:enable` directive '\
it 'flags a missing empty line after a `rubocop:enable` directive ' \
'when it is followed by a `rubocop:disable` directive' do
expect_offense(<<-RUBY)
RSpec.describe User do
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/rspec/empty_line_after_subject_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
RUBY
end

it 'flags a missing empty line after a `rubocop:enable` directive '\
it 'flags a missing empty line after a `rubocop:enable` directive ' \
'when it is followed by a `rubocop:disable` directive' do
expect_offense(<<-RUBY)
RSpec.describe User do
Expand Down
4 changes: 2 additions & 2 deletions spec/rubocop/cop/rspec/file_path_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
RUBY
end

it 'does not register an offense for example groups '\
it 'does not register an offense for example groups ' \
'do not describe a class / method' do
expect_no_offenses(<<-RUBY, 'some/class/spec.rb')
describe 'Test something' do; end
Expand Down Expand Up @@ -198,7 +198,7 @@
RUBY
end

it 'does not register an offense for an arbitrary spec name '\
it 'does not register an offense for an arbitrary spec name ' \
'for an operator method' do
filename = 'my_little_class/spaceship_operator_spec.rb'
expect_no_offenses(<<-RUBY, filename)
Expand Down

0 comments on commit adbc170

Please sign in to comment.