aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-11-04 15:25:15 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-04 15:41:50 -0800
commit425a02cecea188f502ad8f137271d1b90b9c7558 (patch)
tree60895b3e45f50a183a9b172feb394b0652e1fb2b /actionpack/test/controller
parent0ff8f81adcf1e025a34d4a50ea1db39384a00e0b (diff)
downloadrails-425a02cecea188f502ad8f137271d1b90b9c7558.tar.gz
rails-425a02cecea188f502ad8f137271d1b90b9c7558.tar.bz2
rails-425a02cecea188f502ad8f137271d1b90b9c7558.zip
Ruby 1.9: resolve constant lookup issues
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/helper_test.rb12
-rw-r--r--actionpack/test/controller/render_test.rb2
-rw-r--r--actionpack/test/controller/rescue_test.rb6
-rw-r--r--actionpack/test/controller/verification_test.rb2
4 files changed, 11 insertions, 11 deletions
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'