aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-08-16 21:14:26 -0500
committerJoshua Peek <josh@joshpeek.com>2009-08-16 21:14:26 -0500
commit24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247 (patch)
tree8328606506d2db378a35905a0953b59b0e84cfdf /actionpack/test/abstract_unit.rb
parentccf28d2499d1b4e2aba41291eb800e0e02120923 (diff)
downloadrails-24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247.tar.gz
rails-24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247.tar.bz2
rails-24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247.zip
Cleanup route reloading in tests. Prefer with_routing over using ActionController::Routing::Routes directly
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r--actionpack/test/abstract_unit.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index eb4e2fb585..b618c059a3 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -51,6 +51,10 @@ module ActionView
ActionController::Routing::Routes.draw do |map|
map.connect ':controller/:action/:id'
end
+
+ teardown do
+ ActionController::Routing::Routes.reload!
+ end
end
end
end
@@ -70,12 +74,17 @@ module ActionController
class TestCase
include TestProcess
+
setup do
ActionController::Routing::Routes.draw do |map|
map.connect ':controller/:action/:id'
end
end
-
+
+ teardown do
+ ActionController::Routing::Routes.reload!
+ end
+
def assert_template(options = {}, message = nil)
validate_request!