aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-02-25 17:56:58 -0800
committerCarlhuda <carlhuda@engineyard.com>2010-02-25 17:56:58 -0800
commitf863045c45fbbe5972f557c02b729441ffe81502 (patch)
tree801be7cffc8d88ff215b72202bb7830233c5652c
parent8760add31a0415b4635059cf7fadabc26946c0c2 (diff)
downloadrails-f863045c45fbbe5972f557c02b729441ffe81502.tar.gz
rails-f863045c45fbbe5972f557c02b729441ffe81502.tar.bz2
rails-f863045c45fbbe5972f557c02b729441ffe81502.zip
Rename metaclass to singleton_class
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/routing.rb2
-rw-r--r--actionpack/test/controller/caching_test.rb2
-rw-r--r--actionpack/test/controller/integration_test.rb2
-rw-r--r--actionpack/test/controller/resources_test.rb4
4 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb
index 17caa2e030..5a3ff5a04c 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb
@@ -147,7 +147,7 @@ module ActionDispatch
# ROUTES TODO: Figure out this insanity
silence_warnings { ::ActionController.const_set(:UrlFor, @router.named_url_helpers) }
_router = @router
- @controller.metaclass.send(:send, :include, @router.named_url_helpers) if @controller
+ @controller.singleton_class.send(:send, :include, @router.named_url_helpers) if @controller
yield @router
ensure
@router = old_routes
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index 9c9d886f5d..98cea945a7 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -512,7 +512,7 @@ class ActionCacheTest < ActionController::TestCase
@response = ActionController::TestResponse.new
@controller = ActionCachingTestController.new
# ROUTES TODO: It seems bad to explicitly remix in the class
- @controller.metaclass.send(:include, @router.named_url_helpers)
+ @controller.singleton_class.send(:include, @router.named_url_helpers)
@request.host = 'hostname.com'
end
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 1611a549fd..437d26e4ed 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -396,7 +396,7 @@ class IntegrationProcessTest < ActionController::IntegrationTest
get 'get/:action', :to => controller
end
- self.metaclass.send(:include, set.named_url_helpers)
+ self.singleton_class.send(:include, set.named_url_helpers)
yield
end
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index 6f3c16f588..b377e5bbbc 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -1231,7 +1231,7 @@ class ResourcesTest < ActionController::TestCase
@controller = "#{options[:options][:controller].camelize}Controller".constantize.new
# ROUTES TODO: Figure out a way to not extend the routing helpers here
- @controller.metaclass.send(:include, @router.named_url_helpers)
+ @controller.singleton_class.send(:include, @router.named_url_helpers)
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
get :index, options[:options]
@@ -1301,7 +1301,7 @@ class ResourcesTest < ActionController::TestCase
def assert_singleton_named_routes_for(singleton_name, options = {})
(options[:options] ||= {})[:controller] ||= singleton_name.to_s.pluralize
@controller = "#{options[:options][:controller].camelize}Controller".constantize.new
- @controller.metaclass.send(:include, @router.named_url_helpers)
+ @controller.singleton_class.send(:include, @router.named_url_helpers)
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
get :show, options[:options]