@@ -117,29 +117,41 @@ def test_preload_pack_asset
117117 end
118118
119119 def test_stylesheet_pack_tag_split_chunks
120- assert_equal \
121- %(<link rel="stylesheet" media="screen" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n ) +
120+ assert_equal stylesheet_packs_with_chunks_tag ( "application" , "hello_stimulus" ) . in? ( [
121+ %(<link rel="stylesheet" href="/packs/1-c20632e7baf2c81200d3.chunk.css" media="screen" />\n ) +
122+ %(<link rel="stylesheet" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" media="screen" />\n ) +
123+ %(<link rel="stylesheet" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" media="screen" />) ,
124+
125+ %(<link rel="stylesheet" media="screen" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n ) +
122126 %(<link rel="stylesheet" media="screen" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" />\n ) +
123127 %(<link rel="stylesheet" media="screen" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" />) ,
124- stylesheet_packs_with_chunks_tag ( "application" , "hello_stimulus" )
128+ ] ) ,
129+ true
125130 end
126131
127132 def test_stylesheet_pack_tag
128- assert_equal \
133+ assert_equal stylesheet_pack_tag ( "bootstrap.css" ) . in? ( [
134+ %(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="screen" />) ,
135+
129136 %(<link rel="stylesheet" media="screen" href="/packs/bootstrap-c38deda30895059837cf.css" />) ,
130- stylesheet_pack_tag ( "bootstrap.css" )
137+ ] ) , true
131138 end
132139
133140 def test_stylesheet_pack_tag_symbol
134- assert_equal \
141+ assert_equal stylesheet_pack_tag ( :bootstrap ) . in? ( [
142+ %(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="screen" />) ,
143+
135144 %(<link rel="stylesheet" media="screen" href="/packs/bootstrap-c38deda30895059837cf.css" />) ,
136- stylesheet_pack_tag ( :bootstrap )
145+ ] ) , true
137146 end
138147
139148 def test_stylesheet_pack_tag_splat
140- assert_equal \
149+ assert_equal stylesheet_pack_tag ( "bootstrap.css" , "application.css" , media : "all" ) . in? ( [
150+ %(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="all" />\n ) +
151+ %(<link rel="stylesheet" href="/packs/application-dd6b1cd38bfa093df600.css" media="all" />) ,
152+
141153 %(<link rel="stylesheet" media="all" href="/packs/bootstrap-c38deda30895059837cf.css" />\n ) +
142154 %(<link rel="stylesheet" media="all" href="/packs/application-dd6b1cd38bfa093df600.css" />) ,
143- stylesheet_pack_tag ( "bootstrap.css" , "application.css" , media : "all" )
155+ ] ) , true
144156 end
145157end
0 commit comments