diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-01-06 02:49:40 -0800 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-01-06 02:49:40 -0800 |
commit | 1ce0a2a68ac658276fa02faddebb0dde86a92d22 (patch) | |
tree | c9d7c3603de6f4375938d77f01539a491e37a979 | |
parent | a6da73f975892635e6a0bcbfe8eb8410fcbb07a4 (diff) | |
parent | 6cc087b28d8789c14b5adffe861ad257c829090b (diff) | |
download | rails-1ce0a2a68ac658276fa02faddebb0dde86a92d22.tar.gz rails-1ce0a2a68ac658276fa02faddebb0dde86a92d22.tar.bz2 rails-1ce0a2a68ac658276fa02faddebb0dde86a92d22.zip |
Merge pull request #13611 from robinboening/plugin_generator_tests
Add missing tests for invalid names in `rails plugin new` generator
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index f5f2495e7d..932cd75bcb 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -35,6 +35,12 @@ class PluginGeneratorTest < Rails::Generators::TestCase content = capture(:stderr){ run_generator [File.join(destination_root, "43things")] } assert_equal "Invalid plugin name 43things. Please give a name which does not start with numbers.\n", content + + content = capture(:stderr){ run_generator [File.join(destination_root, "plugin")] } + assert_equal "Invalid plugin name plugin. Please give a name which does not match one of the reserved rails words.\n", content + + content = capture(:stderr){ run_generator [File.join(destination_root, "Digest")] } + assert_equal "Invalid plugin name Digest, constant Digest is already in use. Please choose another plugin name.\n", content end def test_camelcase_plugin_name_underscores_filenames |