aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorStefan Sprenger <stefan.sprenger@dkd.de>2011-05-27 13:44:10 +0200
committerStefan Sprenger <stefan.sprenger@dkd.de>2011-05-27 13:44:10 +0200
commite38d3752c377b400aea1d0b854bebf3734664cd7 (patch)
tree4ddb0468d64407dc5505c5aaf19c04ae980cae13 /railties/test/generators
parent5f00592466bd91107ecdfd055140cb2b36e29f50 (diff)
downloadrails-e38d3752c377b400aea1d0b854bebf3734664cd7.tar.gz
rails-e38d3752c377b400aea1d0b854bebf3734664cd7.tar.bz2
rails-e38d3752c377b400aea1d0b854bebf3734664cd7.zip
Generate script/rails only if --full is given
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/plugin_new_generator_test.rb6
-rw-r--r--railties/test/generators/shared_generator_tests.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb
index 1cb7af150e..e87fd265ce 100644
--- a/railties/test/generators/plugin_new_generator_test.rb
+++ b/railties/test/generators/plugin_new_generator_test.rb
@@ -12,7 +12,6 @@ DEFAULT_PLUGIN_FILES = %w(
lib
lib/bukkits.rb
lib/tasks/bukkits_tasks.rake
- script/rails
test/bukkits_test.rb
test/test_helper.rb
test/dummy
@@ -150,6 +149,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
assert_file "config/routes.rb", /Rails.application.routes.draw do/
assert_file "lib/bukkits/engine.rb", /module Bukkits\n class Engine < ::Rails::Engine\n end\nend/
assert_file "lib/bukkits.rb", /require "bukkits\/engine"/
+ assert_file "script/rails"
end
def test_being_quiet_while_creating_dummy_application
@@ -178,7 +178,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
end
def test_usage_of_engine_commands
- run_generator
+ run_generator [destination_root, "--full"]
assert_file "script/rails", /ENGINE_PATH = File.expand_path\('..\/..\/lib\/bukkits\/engine', __FILE__\)/
assert_file "script/rails", /ENGINE_ROOT = File.expand_path\('..\/..', __FILE__\)/
assert_file "script/rails", /require 'rails\/all'/
@@ -186,7 +186,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
end
def test_shebang
- run_generator
+ run_generator [destination_root, "--full"]
assert_file "script/rails", /#!\/usr\/bin\/env ruby/
end
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb
index be9aef8a41..d3074afd91 100644
--- a/railties/test/generators/shared_generator_tests.rb
+++ b/railties/test/generators/shared_generator_tests.rb
@@ -67,12 +67,12 @@ module SharedGeneratorTests
end
def test_shebang_is_added_to_rails_file
- run_generator [destination_root, "--ruby", "foo/bar/baz"]
+ run_generator [destination_root, "--ruby", "foo/bar/baz", "--full"]
assert_file "script/rails", /#!foo\/bar\/baz/
end
def test_shebang_when_is_the_same_as_default_use_env
- run_generator [destination_root, "--ruby", Thor::Util.ruby_command]
+ run_generator [destination_root, "--ruby", Thor::Util.ruby_command, "--full"]
assert_file "script/rails", /#!\/usr\/bin\/env/
end