aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators_test.rb')
-rw-r--r--railties/test/generators_test.rb6
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)