From 890e0a97fb1179fb0acadf3d7146bb786b0c9e0d Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 23 May 2014 10:09:24 -0700 Subject: remove NullRequest and just always pass a request class --- actionpack/test/journey/router_test.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/journey/router_test.rb b/actionpack/test/journey/router_test.rb index 98cd6b0d34..b95f4c169b 100644 --- a/actionpack/test/journey/router_test.rb +++ b/actionpack/test/journey/router_test.rb @@ -41,7 +41,7 @@ module ActionDispatch end def test_dashes - router = Router.new(routes, {}) + router = Router.new(routes, { :request_class => ActionDispatch::Request }) exp = Router::Strexp.new '/foo-bar-baz', {}, ['/.?'] path = Path::Pattern.new exp @@ -57,7 +57,7 @@ module ActionDispatch end def test_unicode - router = Router.new(routes, {}) + router = Router.new(routes, { :request_class => ActionDispatch::Request }) #match the escaped version of /ほげ exp = Router::Strexp.new '/%E3%81%BB%E3%81%92', {}, ['/.?'] @@ -113,10 +113,14 @@ module ActionDispatch assert_equal env.env, klass.env end - class CustomPathRequest < Router::NullReq + class CustomPathRequest < ActionDispatch::Request def path_info env['custom.path_info'] end + + def path_info=(x) + env['custom.path_info'] = x + end end def test_request_class_overrides_path_info -- cgit v1.2.3