Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
arunagw committed Jun 8, 2012
1 parent fa352c4 commit 8b1d475
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -20,7 +20,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 %>
Expand Down
8 changes: 8 additions & 0 deletions railties/test/generators/plugin_new_generator_test.rb
Expand Up @@ -57,6 +57,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"]))
Expand Down

0 comments on commit 8b1d475

Please sign in to comment.