aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2012-12-22 11:13:10 -0800
committerYehuda Katz <wycats@gmail.com>2012-12-22 11:13:10 -0800
commit7173c4f931c9026bd3bc0b644d93dae744433f09 (patch)
tree819b89283a8bbf22327f382ba2b7355e5506bf04 /railties/test/generators
parentf34c27a452418d8aa17f92bb0fd7ae97b5f7e252 (diff)
downloadrails-7173c4f931c9026bd3bc0b644d93dae744433f09.tar.gz
rails-7173c4f931c9026bd3bc0b644d93dae744433f09.tar.bz2
rails-7173c4f931c9026bd3bc0b644d93dae744433f09.zip
Detect rbenv and update the shebang
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/shared_generator_tests.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb
index df34612574..85a90cd968 100644
--- a/railties/test/generators/shared_generator_tests.rb
+++ b/railties/test/generators/shared_generator_tests.rb
@@ -31,6 +31,16 @@ module SharedGeneratorTests
quietly { generator.invoke_all }
end
+ def test_generation_runs_bundle_install_with_shebang_if_needed
+ original_path = ENV["PATH"]
+ ENV["PATH"] = ENV["PATH"] + ":" + File.expand_path("../../fixtures/path", __FILE__)
+
+ generator([destination_root]).expects(:bundle_command).with('install --binstubs --shebang ruby-local-exec').once
+ quietly { generator.invoke_all }
+ ensure
+ ENV["PATH"] = original_path
+ end
+
def test_plugin_new_generate_pretend
run_generator ["testapp", "--pretend"]
default_files.each{ |path| assert_no_file File.join("testapp",path) }