aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-01-14 23:32:40 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2011-01-14 23:34:10 -0200
commitd75ff73a72281cb834fef9aa3afc1413d5b00967 (patch)
tree365fffb29a2361ea3850ee026601c52efaa6e19d /railties/test
parent0aef847927ed2f9c3e3dca92207d9a62baa01b1a (diff)
downloadrails-d75ff73a72281cb834fef9aa3afc1413d5b00967.tar.gz
rails-d75ff73a72281cb834fef9aa3afc1413d5b00967.tar.bz2
rails-d75ff73a72281cb834fef9aa3afc1413d5b00967.zip
plugin new generator should generate config/routes.rb file for full engines
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/plugin_new_generator_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb
index 2a9e8046b8..001a9ef7c9 100644
--- a/railties/test/generators/plugin_new_generator_test.rb
+++ b/railties/test/generators/plugin_new_generator_test.rb
@@ -38,8 +38,9 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
assert_file "things-43/lib/things-43.rb", /module Things43/
end
- def test_generating_test_files
+ def test_generating_without_options
run_generator
+ assert_no_file "config/routes.rb"
assert_file "test/test_helper.rb"
assert_file "test/bukkits_test.rb", /assert_kind_of Module, Bukkits/
end
@@ -151,6 +152,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
def test_creating_engine_in_full_mode
run_generator [destination_root, "--full"]
+ 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"/
end