提交 5fa87281 编写于 作者: A Arun Agrawal

We should not include engine.rake file into rake

if we are passing -T which is skip_test_unit

See issue #6673 for more details.

I saw that we are not creating dummy app even if
we do skip_test_unit.

Fixes #6673
上级 cbfcabc9
......@@ -14,7 +14,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('lib/**/*.rb')
end
<% if full? && !options[:skip_active_record] -%>
<% if full? && !options[:skip_active_record] && !options[:skip_test_unit] -%>
APP_RAKEFILE = File.expand_path("../<%= dummy_path -%>/Rakefile", __FILE__)
load 'rails/tasks/engine.rake'
<% end %>
......
......@@ -58,6 +58,14 @@ def test_generating_test_files_in_full_mode
assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/
end
def test_generating_test_files_in_full_mode_without_unit_test_files
run_generator [destination_root, "-T", "--full"]
assert_no_directory "test/integration/"
assert_no_file "test"
assert_no_match(/APP_RAKEFILE/, File.read(File.join(destination_root, "Rakefile")))
end
def test_ensure_that_plugin_options_are_not_passed_to_app_generator
FileUtils.cd(Rails.root)
assert_no_match(/It works from file!.*It works_from_file/, run_generator([destination_root, "-m", "lib/template.rb"]))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册