Add and apply Style/LineEndConcatenation rule
We were already using it in most places. Note that enabling this rule means we've got to change a few lines in order to follow the LineEndStringConcatenationIndentation rule. In the link list tests, the easiest way to do so was to use heredoc instead, which IMHO improves readability over the previous version.
This commit is contained in:
@@ -18,9 +18,12 @@ describe Shared::LinkListComponent do
|
||||
["Home", "/"], ["Info", "/info"], class: "menu"
|
||||
)
|
||||
|
||||
expect(page).to be_rendered with: '<ul class="menu">' + "\n" +
|
||||
'<li><a href="/">Home</a></li>' + "\n" +
|
||||
'<li><a href="/info">Info</a></li>' + "\n</ul>\n"
|
||||
expect(page).to be_rendered with: <<~HTML
|
||||
<ul class="menu">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/info">Info</a></li>
|
||||
</ul>
|
||||
HTML
|
||||
end
|
||||
|
||||
it "accepts anchor tags" do
|
||||
@@ -28,9 +31,12 @@ describe Shared::LinkListComponent do
|
||||
'<a href="/">Home</a>'.html_safe, ["Info", "/info"], class: "menu"
|
||||
)
|
||||
|
||||
expect(page).to be_rendered with: '<ul class="menu">' + "\n" +
|
||||
'<li><a href="/">Home</a></li>' + "\n" +
|
||||
'<li><a href="/info">Info</a></li>' + "\n</ul>\n"
|
||||
expect(page).to be_rendered with: <<~HTML
|
||||
<ul class="menu">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/info">Info</a></li>
|
||||
</ul>
|
||||
HTML
|
||||
end
|
||||
|
||||
it "accepts options for links" do
|
||||
|
||||
Reference in New Issue
Block a user