Skip to content

Commit e0509b9

Browse files
committed
Experiment with trailing empty lines
1 parent e80d28c commit e0509b9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

spec/rubocop/cop/rspec/excessive_docstring_spacing_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,4 +755,21 @@
755755
end
756756
RUBY
757757
end
758+
759+
it 'flags \-separated multiline interpolated strings with ' \
760+
'leading whitespace and corrects trailing empty lines' do
761+
expect_offense(<<~'RUBY')
762+
describe " ##{object} " \
763+
^^^^^^^^^^^^^^^^ Excessive whitespace.
764+
"(is cool)" \
765+
' ' \
766+
" " do
767+
end
768+
RUBY
769+
770+
expect_correction(<<~'RUBY')
771+
describe "##{object} (is cool)" do
772+
end
773+
RUBY
774+
end
758775
end

0 commit comments

Comments
 (0)