aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-05-17 18:29:20 -0400
committerSantiago Pastorino <santiago@wyeworks.com>2011-05-17 18:29:20 -0400
commit0a070a2444a5e2167e208c0b327af37d757ef70a (patch)
tree3e2d4217dabdfd86088f5af3388be250a847253c
parenta898df66e4b640b5f8faa73e1fc04f9eba278a38 (diff)
downloadrails-0a070a2444a5e2167e208c0b327af37d757ef70a.tar.gz
rails-0a070a2444a5e2167e208c0b327af37d757ef70a.tar.bz2
rails-0a070a2444a5e2167e208c0b327af37d757ef70a.zip
Run bundle install once when using plugin_new --full --mountable. Closes #555
-rw-r--r--railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb1
-rw-r--r--railties/test/generators/plugin_new_generator_test.rb5
2 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
index 939c0cd727..9ddb3cae33 100644
--- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
+++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
@@ -75,6 +75,7 @@ task :default => :test
def generate_test_dummy(force = false)
opts = (options || {}).slice(*PASSTHROUGH_OPTIONS)
opts[:force] = force
+ opts[:skip_bundle] = true
invoke Rails::Generators::AppGenerator,
[ File.expand_path(dummy_path, destination_root) ], opts
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb
index 2af728e766..297ac5d238 100644
--- a/railties/test/generators/plugin_new_generator_test.rb
+++ b/railties/test/generators/plugin_new_generator_test.rb
@@ -95,6 +95,11 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
assert_file "test/dummy/config/database.yml", /postgres/
end
+ def test_generation_runs_bundle_install_with_full_and_mountable
+ result = run_generator [destination_root, "--mountable", "--full"]
+ assert_equal 1, result.scan("Your bundle is complete").size
+ end
+
def test_skipping_javascripts_without_mountable_option
run_generator
assert_no_file "app/assets/javascripts/application.js"