diff options
author | Arun Agrawal <arun@fromjaipur.com> | 2011-07-29 22:06:36 +0530 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:24 -0700 |
commit | 1deb0253aee8ea96eaa118dba7cf8eaa42dcbeba (patch) | |
tree | 809b14ee1cb41b0d7f16b19783ce0d5587ba7390 /railties/test/generators/plugin_new_generator_test.rb | |
parent | bfde0636dd1b1252436ea3c42ddae2eecd2e554b (diff) | |
download | rails-1deb0253aee8ea96eaa118dba7cf8eaa42dcbeba.tar.gz rails-1deb0253aee8ea96eaa118dba7cf8eaa42dcbeba.tar.bz2 rails-1deb0253aee8ea96eaa118dba7cf8eaa42dcbeba.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.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 |