From 425a02cecea188f502ad8f137271d1b90b9c7558 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 4 Nov 2009 15:25:15 -0800 Subject: Ruby 1.9: resolve constant lookup issues --- actionpack/test/controller/helper_test.rb | 12 ++++++------ actionpack/test/controller/render_test.rb | 2 +- actionpack/test/controller/rescue_test.rb | 6 +++--- actionpack/test/controller/verification_test.rb | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 12539739aa..b9be163904 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -3,12 +3,6 @@ require 'active_support/core_ext/kernel/reporting' ActionController::Base.helpers_dir = File.dirname(__FILE__) + '/../fixtures/helpers' -class TestController < ActionController::Base - attr_accessor :delegate_attr - def delegate_method() end - def rescue_action(e) raise end -end - module Fun class GamesController < ActionController::Base def render_hello_world @@ -38,6 +32,12 @@ module LocalAbcHelper end class HelperTest < Test::Unit::TestCase + class TestController < ActionController::Base + attr_accessor :delegate_attr + def delegate_method() end + def rescue_action(e) raise end + end + def setup # Increment symbol counter. @symbol = (@@counter ||= 'A0').succ!.dup diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index ac8dad7c42..b32325fa20 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -860,7 +860,7 @@ class RenderTest < ActionController::TestCase # :ported: def test_access_to_controller_name_in_view get :accessing_controller_name_in_template - assert_equal "test", @response.body # name is explicitly set to 'test' inside the controller. + assert_equal "test", @response.body # name is explicitly set in the controller. end # :ported: diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index 2b1f532b8d..37367eaafc 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -343,9 +343,9 @@ class RescueTest < ActionController::IntegrationTest def with_test_routing with_routing do |set| set.draw do |map| - match 'foo', :to => TestController.action(:foo) - match 'invalid', :to => TestController.action(:invalid) - match 'b00m', :to => TestController.action(:b00m) + match 'foo', :to => ::RescueTest::TestController.action(:foo) + match 'invalid', :to => ::RescueTest::TestController.action(:invalid) + match 'b00m', :to => ::RescueTest::TestController.action(:b00m) end yield end diff --git a/actionpack/test/controller/verification_test.rb b/actionpack/test/controller/verification_test.rb index 63e8cf3e61..11d0d10897 100644 --- a/actionpack/test/controller/verification_test.rb +++ b/actionpack/test/controller/verification_test.rb @@ -126,7 +126,7 @@ class VerificationTest < ActionController::TestCase with_routing do |set| set.draw do |map| match 'foo', :to => 'test#foo', :as => :foo - match 'verification_test/:action', :to => TestController + match 'verification_test/:action', :to => ::VerificationTest::TestController end get :guarded_one_for_named_route_test, :two => "not one" assert_redirected_to '/foo' -- cgit v1.2.3