Split li tags in link list helper
This way we generate the same HTML as we generate everywhere where we manually generate lists of links. Having a blank space betwwen tags results in a space being introduced when the elements are displayed inline (or with `inline-block`). So in places where we don't want that space between the elements we have to use a flex layout.
This commit is contained in:
@@ -13,7 +13,9 @@ describe LinkListHelper do
|
||||
it "generates a list of links" do
|
||||
list = helper.link_list(["Home", "/"], ["Info", "/info"], class: "menu")
|
||||
|
||||
expect(list).to eq '<ul class="menu"><li><a href="/">Home</a></li><li><a href="/info">Info</a></li></ul>'
|
||||
expect(list).to eq '<ul class="menu">' +
|
||||
'<li><a href="/">Home</a></li>' + "\n" +
|
||||
'<li><a href="/info">Info</a></li></ul>'
|
||||
expect(list).to be_html_safe
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user