Skip to content

Commit e392b56

Browse files
authored
Merge pull request #394 from rails/schneems/fix-tests
Fix tests
2 parents 408f813 + f52daf5 commit e392b56

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

test/test_railtie.rb

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def test_defaults_to_compile_assets_with_env_and_manifest_available
8080
assert_equal ROOT, env.root
8181
assert_equal "", env.version
8282
assert env.cache
83-
assert_equal ["#{ROOT}/app/assets/config"], env.paths
83+
assert_includes(env.paths, "#{ROOT}/app/assets/config")
84+
8485
assert_nil env.js_compressor
8586
assert_nil env.css_compressor
8687
end
@@ -128,8 +129,9 @@ def test_copies_paths
128129
app.initialize!
129130

130131
assert env = app.assets
131-
assert_equal ["#{ROOT}/app/assets/config", "#{ROOT}/javascripts", "#{ROOT}/stylesheets"],
132-
env.paths.sort
132+
assert_includes(env.paths, "#{ROOT}/javascripts")
133+
assert_includes(env.paths, "#{ROOT}/stylesheets")
134+
assert_includes(env.paths, "#{ROOT}/app/assets/config")
133135
end
134136

135137
def test_compressors
@@ -220,8 +222,10 @@ def test_configure
220222
app.initialize!
221223

222224
assert env = app.assets
223-
assert_equal ["#{ROOT}/app/assets/config", "#{ROOT}/javascripts", "#{ROOT}/stylesheets"],
224-
env.paths.sort
225+
226+
assert_includes(env.paths, "#{ROOT}/javascripts")
227+
assert_includes(env.paths, "#{ROOT}/stylesheets")
228+
assert_includes(env.paths, "#{ROOT}/app/assets/config")
225229
end
226230

227231
def test_environment_is_frozen_if_caching_classes
@@ -381,8 +385,9 @@ def test_direct_build_environment_call
381385
assert_kind_of Sprockets::Environment, env
382386

383387
assert_equal ROOT, env.root
384-
assert_equal ["#{ROOT}/app/assets/config", "#{ROOT}/javascripts", "#{ROOT}/stylesheets"],
385-
env.paths.sort
388+
assert_includes(env.paths, "#{ROOT}/javascripts")
389+
assert_includes(env.paths, "#{ROOT}/stylesheets")
390+
assert_includes(env.paths, "#{ROOT}/app/assets/config")
386391
end
387392

388393
def test_quiet_assets_defaults_to_off

0 commit comments

Comments
 (0)