diff options
author | Josef Šimánek <josef.simanek@gmail.com> | 2014-09-24 22:17:45 +0200 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2015-04-25 19:14:53 -0400 |
commit | b3a16b61fa0b734523e5d225c88d50632b22e9f7 (patch) | |
tree | 377c9ec097aed9a3cfd601b9ca34d8d8e1f095e4 /railties/test/generators_test.rb | |
parent | 7f50d63f5106286de045e70f75b66549d752f433 (diff) | |
download | rails-b3a16b61fa0b734523e5d225c88d50632b22e9f7.tar.gz rails-b3a16b61fa0b734523e5d225c88d50632b22e9f7.tar.bz2 rails-b3a16b61fa0b734523e5d225c88d50632b22e9f7.zip |
Add test for multiple suggested generator names.
Diffstat (limited to 'railties/test/generators_test.rb')
-rw-r--r-- | railties/test/generators_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index 127e059bf1..fdcfb30090 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -34,6 +34,12 @@ class GeneratorsTest < Rails::Generators::TestCase assert_match "Maybe you meant 'migration'", output end + def test_generator_multiple_suggestions + name = :tas + output = capture(:stdout){ Rails::Generators.invoke name } + assert_match "Maybe you meant 'task', 'job' or 'assets'", output + end + def test_help_when_a_generator_with_required_arguments_is_invoked_without_arguments output = capture(:stdout){ Rails::Generators.invoke :model, [] } assert_match(/Description:/, output) |