diff options
author | José Valim <jose.valim@gmail.com> | 2011-07-29 10:11:43 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-07-29 10:11:43 -0700 |
commit | bbe1b1afcef0813883d80e60a0d9dd93f778e6e2 (patch) | |
tree | b8fd1df2ecdc795db4d9cb36e2f53c418b985066 /railties/test/generators | |
parent | 270fa63e9b16ae31371afa199d4de72afc41ac93 (diff) | |
parent | 4fe2c99052928a8669d7bbc70bfdfe059eba67bc (diff) | |
download | rails-bbe1b1afcef0813883d80e60a0d9dd93f778e6e2.tar.gz rails-bbe1b1afcef0813883d80e60a0d9dd93f778e6e2.tar.bz2 rails-bbe1b1afcef0813883d80e60a0d9dd93f778e6e2.zip |
Merge pull request #2343 from arunagw/test_add_for_plugin_new_gen
Test add for plugin new generator generate mailer
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index e6ea1cbc33..19e80eee89 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -25,10 +25,6 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase # brings setup, teardown, and some tests include SharedGeneratorTests - def default_files - ::DEFAULT_PLUGIN_FILES - end - 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 @@ -176,6 +172,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_file "app/controllers" assert_file "app/views" assert_file "app/helpers" + assert_file "app/mailers" assert_file "config/routes.rb", /Rails.application.routes.draw do/ assert_file "lib/bukkits/engine.rb", /module Bukkits\n class Engine < ::Rails::Engine\n end\nend/ assert_file "lib/bukkits.rb", /require "bukkits\/engine"/ @@ -257,6 +254,10 @@ protected silence(:stdout){ generator.send(*args, &block) } end +protected + def default_files + ::DEFAULT_PLUGIN_FILES + end end class CustomPluginGeneratorTest < Rails::Generators::TestCase |