aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-07-04 17:09:09 +0200
committerJosé Valim <jose.valim@gmail.com>2009-07-04 20:17:32 +0200
commit8ff214e0db31a6827b52f738c409d97d70b363d5 (patch)
tree318f6ef97f9fbc9265a9c96a2df640da492ad1cc /railties/test
parentda09d46ed463459eb651f6c1e6af923e283da6e6 (diff)
downloadrails-8ff214e0db31a6827b52f738c409d97d70b363d5.tar.gz
rails-8ff214e0db31a6827b52f738c409d97d70b363d5.tar.bz2
rails-8ff214e0db31a6827b52f738c409d97d70b363d5.zip
Use the proper shebang when using Ruby 1.9 or jruby or windows.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 98994f6ad2..8955789087 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -109,6 +109,21 @@ class AppGeneratorTest < GeneratorsTestCase
).each { |path| assert_file "script/#{path}", /#!foo\/bar\/baz/ }
end
+ def test_shebang_when_is_the_same_as_default_use_env
+ run_generator ["--ruby", Thor::Util.ruby_command]
+
+ %w(
+ about
+ console
+ dbconsole
+ destroy
+ generate
+ plugin
+ runner
+ server
+ ).each { |path| assert_file "script/#{path}", /#!\/usr\/bin\/env/ }
+ end
+
def test_rails_is_frozen
generator(:freeze => true, :database => "sqlite3").expects(:run).with("rake rails:freeze:edge", false)
silence(:stdout){ generator.invoke }