Skip to content

Commit

Permalink
Merge pull request #1993 from corsonknowles/demonstrate_trailing_empt…
Browse files Browse the repository at this point in the history
…y_line_behavior

Document behavior of trailing empty lines for `ExcessiveDocstringSpacing`
  • Loading branch information
ydah authored Oct 31, 2024
2 parents f2b7cd1 + e0509b9 commit 00b6c03
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/rubocop/cop/rspec/excessive_docstring_spacing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -755,4 +755,21 @@
end
RUBY
end

it 'flags \-separated multiline interpolated strings with ' \
'leading whitespace and corrects trailing empty lines' do
expect_offense(<<~'RUBY')
describe " ##{object} " \
^^^^^^^^^^^^^^^^ Excessive whitespace.
"(is cool)" \
' ' \
" " do
end
RUBY

expect_correction(<<~'RUBY')
describe "##{object} (is cool)" do
end
RUBY
end
end

0 comments on commit 00b6c03

Please sign in to comment.