aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-02-26 17:18:29 -0800
committerCarlhuda <carlhuda@engineyard.com>2010-02-26 17:18:45 -0800
commit050831803a9e553ba392a73732b00528dfa8c6ad (patch)
tree177a9050c5c07a80dedfc2bdc49b73b96d1a257d /actionpack/test
parent6324eeefd7d1dd7b628afdcf436649062d12bbab (diff)
downloadrails-050831803a9e553ba392a73732b00528dfa8c6ad.tar.gz
rails-050831803a9e553ba392a73732b00528dfa8c6ad.tar.bz2
rails-050831803a9e553ba392a73732b00528dfa8c6ad.zip
If IntegrationSession is initialized with an objects that responds to #routes, automatically extend the URL helpers from the RouteSet onto it
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/abstract_unit.rb1
-rw-r--r--actionpack/test/controller/caching_test.rb1
-rw-r--r--actionpack/test/controller/integration_test.rb6
-rw-r--r--actionpack/test/controller/resources_test.rb1
4 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index c95673d97e..c178dc481c 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -85,6 +85,7 @@ end
class RoutedRackApp
attr_reader :router
+ alias routes router
def initialize(router, &blk)
@router = router
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index 67b6a1d858..80c968cc04 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -511,7 +511,6 @@ class ActionCacheTest < ActionController::TestCase
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@controller = ActionCachingTestController.new
- # ROUTES TODO: It seems bad to explicitly remix in the class
@controller.singleton_class.send(:include, @router.url_helpers)
@request.host = 'hostname.com'
end
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 5352243734..c38348fa68 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -178,8 +178,8 @@ class IntegrationTestTest < Test::Unit::TestCase
session1 = @test.open_session { |sess| }
session2 = @test.open_session # implicit session
- assert_equal ::ActionController::Integration::Session, session1.class
- assert_equal ::ActionController::Integration::Session, session2.class
+ assert_kind_of ::ActionController::Integration::Session, session1
+ assert_kind_of ::ActionController::Integration::Session, session2
assert_not_equal session1, session2
end
@@ -221,8 +221,6 @@ class IntegrationTestUsesCorrectClass < ActionController::IntegrationTest
end
class IntegrationProcessTest < ActionController::IntegrationTest
- include SharedTestRoutes.url_helpers
-
class IntegrationController < ActionController::Base
def get
respond_to do |format|
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index cf0cab3690..f60045bba6 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -1230,7 +1230,6 @@ class ResourcesTest < ActionController::TestCase
end
@controller = "#{options[:options][:controller].camelize}Controller".constantize.new
- # ROUTES TODO: Figure out a way to not extend the routing helpers here
@controller.singleton_class.send(:include, @router.url_helpers)
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new