提交 915f0e68 编写于 作者: T Tsukuru Tanimichi

Add tests for the `--webpack` option

We probably don't have any tests for the `--webpack` option.
related: #27288
上级 f128177e
......@@ -743,6 +743,20 @@ def test_spring_with_dev_option
end
end
def test_webpack_option
command_check = -> command, *_ do
@called ||= 0
@called += 1 if command == "webpacker:install"
assert_equal 1, @called, "webpacker:install expected to be called once, but was called #{@called} times."
end
generator([destination_root], webpack: true).stub(:rails_command, command_check) do
quietly { generator.invoke_all }
end
assert_gem "webpacker"
end
def test_generator_if_skip_turbolinks_is_given
run_generator [destination_root, "--skip-turbolinks"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册