Skip to content

Commit

Permalink
Merge pull request #2343 from arunagw/test_add_for_plugin_new_gen
Browse files Browse the repository at this point in the history
Test add for plugin new generator generate mailer
  • Loading branch information
josevalim committed Jul 29, 2011
2 parents 270fa63 + 4fe2c99 commit bbe1b1a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions railties/test/generators/plugin_new_generator_test.rb
Expand Up @@ -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
Expand Down Expand Up @@ -176,6 +172,7 @@ def test_creating_engine_in_full_mode
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"/
Expand Down Expand Up @@ -257,6 +254,10 @@ def action(*args, &block)
silence(:stdout){ generator.send(*args, &block) }
end

protected
def default_files
::DEFAULT_PLUGIN_FILES
end
end

class CustomPluginGeneratorTest < Rails::Generators::TestCase
Expand Down

0 comments on commit bbe1b1a

Please sign in to comment.