diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 12539739aa8d27fdfc5c8dd7b8ba7b05e2c66b1f..b9be163904107993d0e95788d48c0bc674b2d574 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -3,12 +3,6 @@ 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 @@ def c() end 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 ac8dad7c427508cb513b7a1c000a08b8fd8ab967..b32325fa20e6a14aa71ce7ab00d5d7ab86216a30 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -860,7 +860,7 @@ def test_access_to_action_name_in_view # :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 2b1f532b8d7e041582ed23438baa2819f5c504f5..37367eaafc2f56bec445b2e3bf436803603298ce 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -343,9 +343,9 @@ def show_errors(exception) 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 63e8cf3e616abebf4849e82b96552eeee3dd674d..11d0d1089753be924ff339e0f9414090660a5dbb 100644 --- a/actionpack/test/controller/verification_test.rb +++ b/actionpack/test/controller/verification_test.rb @@ -126,7 +126,7 @@ def test_no_deprecation_warning_for_named_route 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' diff --git a/actionpack/test/dispatch/request/json_params_parsing_test.rb b/actionpack/test/dispatch/request/json_params_parsing_test.rb index 3c2408de5f71ab6779ef155a9c3cf326193f7f4c..d3308f73cc5a7e8ba2ca022269264f28162cc529 100644 --- a/actionpack/test/dispatch/request/json_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/json_params_parsing_test.rb @@ -57,7 +57,7 @@ def assert_parses(expected, actual, headers = {}) def with_test_routing with_routing do |set| set.draw do |map| - match ':action', :to => TestController + match ':action', :to => ::JsonParamsParsingTest::TestController end yield end diff --git a/actionpack/test/dispatch/request/query_string_parsing_test.rb b/actionpack/test/dispatch/request/query_string_parsing_test.rb index b764478d87913ef00788756e767fa63a8c2a9cb7..071d80c5b0a797dcf395684cddfff4f98651d092 100644 --- a/actionpack/test/dispatch/request/query_string_parsing_test.rb +++ b/actionpack/test/dispatch/request/query_string_parsing_test.rb @@ -109,12 +109,12 @@ def teardown def assert_parses(expected, actual) with_routing do |set| set.draw do |map| - match ':action', :to => TestController + match ':action', :to => ::QueryStringParsingTest::TestController end get "/parse", actual assert_response :ok - assert_equal(expected, TestController.last_query_parameters) + assert_equal(expected, ::QueryStringParsingTest::TestController.last_query_parameters) end end end diff --git a/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb b/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb index e98a49980ee32e6c6b22a6cf0f50987df72d0956..69dbd7f5281fd0a4a913d5aa3fb40c7013ad6aca 100644 --- a/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb @@ -130,7 +130,7 @@ def teardown def with_test_routing with_routing do |set| set.draw do |map| - match ':action', :to => TestController + match ':action', :to => ::UrlEncodedParamsParsingTest::TestController end yield end diff --git a/actionpack/test/dispatch/request/xml_params_parsing_test.rb b/actionpack/test/dispatch/request/xml_params_parsing_test.rb index 0dc47ed9d5b4da2e0fb63d93c8f51ce9525567cd..96189e4ca26fa0908abc56561081f41c2560b37f 100644 --- a/actionpack/test/dispatch/request/xml_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/xml_params_parsing_test.rb @@ -84,7 +84,7 @@ def teardown def with_test_routing with_routing do |set| set.draw do |map| - match ':action', :to => TestController + match ':action', :to => ::XmlParamsParsingTest::TestController end yield end @@ -100,4 +100,4 @@ class LegacyXmlParamsParsingTest < XmlParamsParsingTest def default_headers {'HTTP_X_POST_DATA_FORMAT' => 'xml'} end -end \ No newline at end of file +end diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb index edfc303d3d26270ccc778f1f55badac3dce12db9..ab7b9bc31bb1732a4343855ed56e63c54ea3fa59 100644 --- a/actionpack/test/dispatch/session/cookie_store_test.rb +++ b/actionpack/test/dispatch/session/cookie_store_test.rb @@ -219,7 +219,7 @@ def test_session_store_with_expire_after def with_test_route_set(options = {}) with_routing do |set| set.draw do |map| - match ':action', :to => TestController + match ':action', :to => ::CookieStoreTest::TestController end options = {:key => SessionKey, :secret => SessionSecret}.merge(options) @app = ActionDispatch::Session::CookieStore.new(set, options) diff --git a/actionpack/test/dispatch/session/mem_cache_store_test.rb b/actionpack/test/dispatch/session/mem_cache_store_test.rb index afc9d91d50512e217637350cb01f8a3c5fc0d5d5..5a1dcb4dab09073d0ba1b185955d2bb8b8ac7b4b 100644 --- a/actionpack/test/dispatch/session/mem_cache_store_test.rb +++ b/actionpack/test/dispatch/session/mem_cache_store_test.rb @@ -112,7 +112,7 @@ def test_prevents_session_fixation def with_test_route_set with_routing do |set| set.draw do |map| - match ':action', :to => TestController + match ':action', :to => ::MemCacheStoreTest::TestController end @app = ActionDispatch::Session::MemCacheStore.new(set, :key => '_session_id') yield