1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

cleanup: rubocop: fix Layout/ClosingHeredocIndentation and Layout/IndentHeredoc in test/unit/lib/redmine/wiki_formatting/macros_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18987 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-09 05:24:57 +00:00
parent fae40298d8
commit 09af8e6683
2 changed files with 35 additions and 41 deletions

View File

@ -40,7 +40,6 @@ Layout/CaseIndentation:
# Cop supports --auto-correct.
Layout/ClosingHeredocIndentation:
Exclude:
- 'test/unit/lib/redmine/wiki_formatting/macros_test.rb'
- 'test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb'
- 'test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb'
- 'test/unit/lib/redmine/wiki_formatting_test.rb'
@ -156,7 +155,6 @@ Layout/IndentFirstHashElement:
# SupportedStyles: squiggly, active_support, powerpack, unindent
Layout/IndentHeredoc:
Exclude:
- 'test/unit/lib/redmine/wiki_formatting/macros_test.rb'
- 'test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb'
- 'test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb'
- 'test/unit/lib/redmine/wiki_formatting_test.rb'

View File

@ -243,7 +243,7 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest
def test_macro_collapse_should_not_break_toc
set_language_if_valid 'en'
text = <<-RAW
text = <<~RAW
{{toc}}
h1. Title
@ -350,7 +350,7 @@ RAW
end
def test_macros_should_not_be_executed_in_pre_tags
text = <<-RAW
text = <<~RAW
{{hello_world(foo)}}
<pre>
@ -360,8 +360,7 @@ RAW
{{hello_world(bar)}}
RAW
expected = <<-EXPECTED
expected = <<~EXPECTED
<p>Hello world! Object: NilClass, Arguments: foo and no block of text.</p>
<pre>
@ -371,7 +370,6 @@ RAW
<p>Hello world! Object: NilClass, Arguments: bar and no block of text.</p>
EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(text).gsub(%r{[\r\n\t]}, '')
end
@ -386,7 +384,7 @@ EXPECTED
end
def test_macros_with_text_should_not_mangle_following_macros
text = <<-RAW
text = <<~RAW
{{hello_world
Line of text
}}
@ -395,12 +393,10 @@ Line of text
Another line of text
}}
RAW
expected = <<-EXPECTED
expected = <<~EXPECTED
<p>Hello world! Object: NilClass, Called with no argument and a 12 bytes long block of text.</p>
<p>Hello world! Object: NilClass, Called with no argument and a 20 bytes long block of text.</p>
EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(text).gsub(%r{[\r\n\t]}, '')
end