aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit/controller/templates
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/test_unit/controller/templates')
-rw-r--r--railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb
index 509bd60564..7106096b60 100644
--- a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb
+++ b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb
@@ -2,6 +2,12 @@ require 'test_helper'
<% module_namespacing do -%>
class <%= class_name %>ControllerTest < ActionController::TestCase
+<% if defined?(ENGINE_ROOT) -%>
+ setup do
+ @routes = Engine.routes
+ end
+
+<% end -%>
<% if actions.empty? -%>
# test "the truth" do
# assert true