提交 da589fcc 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #30091 from yhirano55/fix_engine_command

Fix engine command
......@@ -3,7 +3,9 @@
ENGINE_ROOT = File.expand_path('..', __dir__)
ENGINE_PATH = File.expand_path('../lib/<%= namespaced_name -%>/engine', __dir__)
<% if with_dummy_app? -%>
APP_PATH = File.expand_path('../<%= dummy_path -%>/config/application', __dir__)
<% end -%>
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
......
......@@ -101,6 +101,9 @@ def test_generating_test_files_in_full_mode_without_unit_test_files
assert_file "Rakefile" do |contents|
assert_no_match(/APP_RAKEFILE/, contents)
end
assert_file "bin/rails" do |contents|
assert_no_match(/APP_PATH/, contents)
end
end
def test_generating_adds_dummy_app_in_full_mode_without_sprockets
......@@ -114,6 +117,7 @@ def test_generating_adds_dummy_app_in_full_mode_without_sprockets
def test_generating_adds_dummy_app_rake_tasks_without_unit_test_files
run_generator [destination_root, "-T", "--mountable", "--dummy-path", "my_dummy_app"]
assert_file "Rakefile", /APP_RAKEFILE/
assert_file "bin/rails", /APP_PATH/
end
def test_generating_adds_dummy_app_without_javascript_and_assets_deps
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册