From: Toshi MARUYAMA Date: Fri, 22 Nov 2019 14:54:43 +0000 (+0000) Subject: cleanup: rubocop: fix Layout/ClosingHeredocIndentation in test/unit/lib/redmine/wiki_... X-Git-Tag: 4.2.0~1470 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0095bbbd728c90839607ced438d29cb72ae4570c;p=redmine.git cleanup: rubocop: fix Layout/ClosingHeredocIndentation in test/unit/lib/redmine/wiki_formatting_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19170 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 59fc5d1ec..0bbf8cbde 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -39,11 +39,6 @@ Layout/AlignArguments: Layout/AlignHash: Enabled: false -# Cop supports --auto-correct. -Layout/ClosingHeredocIndentation: - Exclude: - - 'test/unit/lib/redmine/wiki_formatting_test.rb' - # Cop supports --auto-correct. Layout/ClosingParenthesisIndentation: Enabled: false diff --git a/test/unit/lib/redmine/wiki_formatting_test.rb b/test/unit/lib/redmine/wiki_formatting_test.rb index a9a4e4681..1c5d4d20f 100644 --- a/test/unit/lib/redmine/wiki_formatting_test.rb +++ b/test/unit/lib/redmine/wiki_formatting_test.rb @@ -37,16 +37,14 @@ class Redmine::WikiFormattingTest < ActiveSupport::TestCase end def test_should_link_urls_and_email_addresses - raw = <<-DIFF -This is a sample *text* with a link: http://www.redmine.org -and an email address foo@example.net -DIFF - - expected = <<-EXPECTED -

This is a sample *text* with a link: http://www.redmine.org
-and an email address

-EXPECTED - + raw = <<~DIFF + This is a sample *text* with a link: http://www.redmine.org + and an email address foo@example.net + DIFF + expected = <<~EXPECTED +

This is a sample *text* with a link: http://www.redmine.org
+ and an email address

+ EXPECTED assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '') end @@ -57,16 +55,14 @@ EXPECTED end def test_links_separated_with_line_break_should_link - raw = <<-DIFF -link: https://www.redmine.org -http://www.redmine.org -DIFF - - expected = <<-EXPECTED -

link: https://www.redmine.org
-http://www.redmine.org

-EXPECTED - + raw = <<~DIFF + link: https://www.redmine.org + http://www.redmine.org + DIFF + expected = <<~EXPECTED +

link: https://www.redmine.org
+ http://www.redmine.org

+ EXPECTED assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '') end