aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/plugin_new_generator_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2012-02-01 09:49:41 -0800
committerJosé Valim <jose.valim@plataformatec.com.br>2012-02-01 09:49:41 -0800
commit6b22889bd8950e6d0cfad29db0e425a731067a46 (patch)
treef167a31929b8c849077617c9b801c1b85dd405e1 /railties/test/generators/plugin_new_generator_test.rb
parentd2c64009482d38d4894dd09d2d1e2fb4a165ecac (diff)
parent8afa8b0c218fe9c197140ebeeedd758fdf77c0e1 (diff)
downloadrails-6b22889bd8950e6d0cfad29db0e425a731067a46.tar.gz
rails-6b22889bd8950e6d0cfad29db0e425a731067a46.tar.bz2
rails-6b22889bd8950e6d0cfad29db0e425a731067a46.zip
Merge pull request #4826 from kennyj/fix_4737-2
Fix GH #4737. Missing helper file (LoadError) in mountable plugin.
Diffstat (limited to 'railties/test/generators/plugin_new_generator_test.rb')
-rw-r--r--railties/test/generators/plugin_new_generator_test.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb
index f0164ed667..4bb5f04a79 100644
--- a/railties/test/generators/plugin_new_generator_test.rb
+++ b/railties/test/generators/plugin_new_generator_test.rb
@@ -27,13 +27,14 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
include SharedGeneratorTests
def test_invalid_plugin_name_raises_an_error
- content = capture(:stderr){ run_generator [File.join(destination_root, "43-things")] }
- assert_equal "Invalid plugin name 43-things. Please give a name which does not start with numbers.\n", content
- end
-
- def test_invalid_plugin_name_is_fixed
- run_generator [File.join(destination_root, "things-43")]
- assert_file "things-43/lib/things-43.rb", /module Things43/
+ content = capture(:stderr){ run_generator [File.join(destination_root, "things-43")] }
+ assert_equal "Invalid plugin name things-43. Please give a name which use only alphabetic or numeric or \"_\" characters.\n", content
+
+ content = capture(:stderr){ run_generator [File.join(destination_root, "things4.3")] }
+ assert_equal "Invalid plugin name things4.3. Please give a name which use only alphabetic or numeric or \"_\" characters.\n", content
+
+ 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
end
def test_camelcase_plugin_name_underscores_filenames