aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-04-09 10:21:28 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2012-04-09 10:21:28 -0700
commit84adc214985ff7a2c02d120ca364b6f3771cb3b3 (patch)
tree8d40008142636941f1684f100b766356c760d86d /railties/test/generators/app_generator_test.rb
parente065312a146a642045d66d213b727128135e8144 (diff)
parent4bb76eecfef844c33e141dc9e167b9fc281fe83d (diff)
downloadrails-84adc214985ff7a2c02d120ca364b6f3771cb3b3.tar.gz
rails-84adc214985ff7a2c02d120ca364b6f3771cb3b3.tar.bz2
rails-84adc214985ff7a2c02d120ca364b6f3771cb3b3.zip
Merge pull request #5788 from Ask11/rails_new_help
"rails new -h" shows message in rails directory
Diffstat (limited to 'railties/test/generators/app_generator_test.rb')
-rw-r--r--railties/test/generators/app_generator_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 128854e4ad..40cb876b34 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -83,6 +83,16 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_equal false, $?.success?
end
+ def test_application_new_show_help_message_inside_existing_rails_directory
+ app_root = File.join(destination_root, 'myfirstapp')
+ run_generator [app_root]
+ output = Dir.chdir(app_root) do
+ `rails new --help`
+ end
+ assert_match /rails new APP_PATH \[options\]/, output
+ assert_equal true, $?.success?
+ end
+
def test_application_name_is_detected_if_it_exists_and_app_folder_renamed
app_root = File.join(destination_root, "myapp")
app_moved_root = File.join(destination_root, "myapp_moved")