diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-08 09:44:36 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-08 09:44:36 -0700 |
commit | 0e4d16f78f0bb08fa1e8351be97f984f1a5e4f58 (patch) | |
tree | 3199eb657a66ab2e701aed7e8e01104c8bc11c70 | |
parent | dfb1ebe63d78703747a515cca53b044cd1a52e4b (diff) | |
parent | 8b1d475f9667e9ecc7478e8a01de912cca2a4497 (diff) | |
download | rails-0e4d16f78f0bb08fa1e8351be97f984f1a5e4f58.tar.gz rails-0e4d16f78f0bb08fa1e8351be97f984f1a5e4f58.tar.bz2 rails-0e4d16f78f0bb08fa1e8351be97f984f1a5e4f58.zip |
Merge pull request #6678 from arunagw/fix_issue_6673
Fix issue 6673
-rwxr-xr-x | railties/lib/rails/generators/rails/plugin_new/templates/Rakefile | 2 | ||||
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile index 6ed6adcf1b..564fda3c49 100755 --- a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile +++ b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile @@ -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 %> diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 3533d61a79..7569c90955 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -57,6 +57,14 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase 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"])) |