aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/plugin_new_generator_test.rb
diff options
context:
space:
mode:
authorArun Agrawal <arun@fromjaipur.com>2011-07-29 22:06:36 +0530
committerArun Agrawal <arun@fromjaipur.com>2011-07-29 22:06:36 +0530
commit4fe2c99052928a8669d7bbc70bfdfe059eba67bc (patch)
treeb8fd1df2ecdc795db4d9cb36e2f53c418b985066 /railties/test/generators/plugin_new_generator_test.rb
parent270fa63e9b16ae31371afa199d4de72afc41ac93 (diff)
downloadrails-4fe2c99052928a8669d7bbc70bfdfe059eba67bc.tar.gz
rails-4fe2c99052928a8669d7bbc70bfdfe059eba67bc.tar.bz2
rails-4fe2c99052928a8669d7bbc70bfdfe059eba67bc.zip
Test add for plugin new generator generate mailer
Diffstat (limited to 'railties/test/generators/plugin_new_generator_test.rb')
-rw-r--r--railties/test/generators/plugin_new_generator_test.rb9
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