Skip to content

Commit 663cfac

Browse files
modify br tag to comply with CI expecs
1 parent c9c807f commit 663cfac

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

spec/usage/base/component_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ def response
465465
components {
466466
div id: "my-component" do
467467
slot @options[:my_first_slot]
468-
br
469468
slot @options[:my_second_slot]
470469
end
471470
}
@@ -516,7 +515,6 @@ def my_second_simple_slot
516515
<span id="my_simple_slot">
517516
some content
518517
</span>
519-
<br/>
520518
<span id="my_simple_slot">
521519
foo from page
522520
</span>
@@ -568,9 +566,7 @@ def response
568566
components {
569567
div id: "my-other-component" do
570568
slot @options[:slots][:my_slot_from_component]
571-
br
572569
slot @options[:slots][:my_slot_from_page]
573-
br
574570
plain @foo
575571
end
576572
}
@@ -613,11 +609,9 @@ def my_slot_from_page
613609
<span id="my-slot-from-component">
614610
foo from component
615611
</span>
616-
<br/>
617612
<span id="my-slot-from-page">
618613
foo from page
619614
</span>
620-
<br/>
621615
foo from other component
622616
</div>
623617
</div>

spec/usage/components/br_spec.rb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def response
2727

2828
static_output = page.html
2929

30-
expected_static_output = <<~HTML
30+
expected_static_output_1 = <<~HTML
3131
hello
3232
<br>
3333
world!
@@ -41,7 +41,21 @@ def response
4141
world!
4242
HTML
4343

44-
expect(stripped(static_output)).to include(stripped(expected_static_output))
44+
expected_static_output_2 = <<~HTML
45+
hello
46+
<br/>
47+
world!
48+
49+
hello
50+
<br/>
51+
<br/>
52+
<br/>
53+
<br/>
54+
<br/>
55+
world!
56+
HTML
57+
58+
expect(stripped(static_output)).to ( include(stripped(expected_static_output_1)) or include(stripped(expected_static_output_2)) )
4559
end
4660

4761
end

0 commit comments

Comments
 (0)