diff options
author | Yehuda Katz <wycats@gmail.com> | 2012-12-22 10:57:50 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2012-12-22 10:57:50 -0800 |
commit | f34c27a452418d8aa17f92bb0fd7ae97b5f7e252 (patch) | |
tree | 32696e36412ce0b1fa247b171e642e01bc2055f5 | |
parent | cba05887dc3b56a46a9fe2779b6b228880b49622 (diff) | |
download | rails-f34c27a452418d8aa17f92bb0fd7ae97b5f7e252.tar.gz rails-f34c27a452418d8aa17f92bb0fd7ae97b5f7e252.tar.bz2 rails-f34c27a452418d8aa17f92bb0fd7ae97b5f7e252.zip |
Install binstubs by default
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index edd1e8cbdf..9874fb462a 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -261,7 +261,7 @@ module Rails end def run_bundle - bundle_command('install') unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend] + bundle_command('install --binstubs') unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend] end def empty_directory_with_keep_file(destination, config = {}) diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index 1e5a4545a1..df34612574 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -27,7 +27,7 @@ module SharedGeneratorTests end def test_generation_runs_bundle_install - generator([destination_root]).expects(:bundle_command).with('install').once + generator([destination_root]).expects(:bundle_command).with('install --binstubs').once quietly { generator.invoke_all } end @@ -101,14 +101,14 @@ module SharedGeneratorTests end def test_dev_option - generator([destination_root], dev: true).expects(:bundle_command).with('install').once + generator([destination_root], dev: true).expects(:bundle_command).with('install --binstubs').once quietly { generator.invoke_all } rails_path = File.expand_path('../../..', Rails.root) assert_file 'Gemfile', /^gem\s+["']rails["'],\s+path:\s+["']#{Regexp.escape(rails_path)}["']$/ end def test_edge_option - generator([destination_root], edge: true).expects(:bundle_command).with('install').once + generator([destination_root], edge: true).expects(:bundle_command).with('install --binstubs').once quietly { generator.invoke_all } assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["']$} end |