Skip to content

Commit ccf400e

Browse files
committed
Test direct build call
1 parent 59a80b4 commit ccf400e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/test_railtie.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,4 +335,19 @@ def test_task_precompile_compile_false
335335
end
336336
refute File.exist?(path)
337337
end
338+
339+
def test_direct_build_environment_call
340+
app.configure do
341+
config.assets.paths << "javascripts"
342+
config.assets.paths << "stylesheets"
343+
end
344+
app.initialize!
345+
346+
assert env = Sprockets::Railtie.build_environment(app)
347+
assert_kind_of Sprockets::Environment, env
348+
349+
assert_equal ROOT, env.root
350+
assert_equal ["#{ROOT}/javascripts", "#{ROOT}/stylesheets"],
351+
env.paths.sort
352+
end
338353
end

0 commit comments

Comments
 (0)