diff options
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/mapper_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb index 7ba946aa7f..10ef00ca50 100644 --- a/actionpack/test/dispatch/mapper_test.rb +++ b/actionpack/test/dispatch/mapper_test.rb @@ -67,7 +67,7 @@ module ActionDispatch mapper.get '/foo', :to => 'posts#index', :as => :main, :format => true assert_equal({:controller=>"posts", :action=>"index"}, fakeset.defaults.first) - assert_equal "/foo.:format", fakeset.conditions.first[:path_info] + assert_equal "/foo.:format", fakeset.conditions.first[:parsed_path_info].to_s end def test_scoped_formatted @@ -78,7 +78,7 @@ module ActionDispatch end assert_equal({:controller=>"posts", :action=>"index"}, fakeset.defaults.first) - assert_equal "/foo.:format", fakeset.conditions.first[:path_info] + assert_equal "/foo.:format", fakeset.conditions.first[:parsed_path_info].to_s end def test_random_keys @@ -113,7 +113,7 @@ module ActionDispatch fakeset = FakeSet.new mapper = Mapper.new fakeset mapper.get '/', :to => 'posts#index', :as => :main - assert_equal '/', fakeset.conditions.first[:path_info] + assert_equal '/', fakeset.conditions.first[:parsed_path_info].to_s end def test_map_more_slashes @@ -122,14 +122,14 @@ module ActionDispatch # FIXME: is this a desired behavior? mapper.get '/one/two/', :to => 'posts#index', :as => :main - assert_equal '/one/two(.:format)', fakeset.conditions.first[:path_info] + assert_equal '/one/two(.:format)', fakeset.conditions.first[:parsed_path_info].to_s end def test_map_wildcard fakeset = FakeSet.new mapper = Mapper.new fakeset mapper.get '/*path', :to => 'pages#show' - assert_equal '/*path(.:format)', fakeset.conditions.first[:path_info] + assert_equal '/*path(.:format)', fakeset.conditions.first[:parsed_path_info].to_s assert_equal(/.+?/, fakeset.requirements.first[:path]) end @@ -137,7 +137,7 @@ module ActionDispatch fakeset = FakeSet.new mapper = Mapper.new fakeset mapper.get '/*path/foo/:bar', :to => 'pages#show' - assert_equal '/*path/foo/:bar(.:format)', fakeset.conditions.first[:path_info] + assert_equal '/*path/foo/:bar(.:format)', fakeset.conditions.first[:parsed_path_info].to_s assert_equal(/.+?/, fakeset.requirements.first[:path]) end @@ -145,7 +145,7 @@ module ActionDispatch fakeset = FakeSet.new mapper = Mapper.new fakeset mapper.get '/*foo/*bar', :to => 'pages#show' - assert_equal '/*foo/*bar(.:format)', fakeset.conditions.first[:path_info] + assert_equal '/*foo/*bar(.:format)', fakeset.conditions.first[:parsed_path_info].to_s assert_equal(/.+?/, fakeset.requirements.first[:foo]) assert_equal(/.+?/, fakeset.requirements.first[:bar]) end @@ -154,7 +154,7 @@ module ActionDispatch fakeset = FakeSet.new mapper = Mapper.new fakeset mapper.get '/*path', :to => 'pages#show', :format => false - assert_equal '/*path', fakeset.conditions.first[:path_info] + assert_equal '/*path', fakeset.conditions.first[:parsed_path_info].to_s assert_nil fakeset.requirements.first[:path] end @@ -162,7 +162,7 @@ module ActionDispatch fakeset = FakeSet.new mapper = Mapper.new fakeset mapper.get '/*path', :to => 'pages#show', :format => true - assert_equal '/*path.:format', fakeset.conditions.first[:path_info] + assert_equal '/*path.:format', fakeset.conditions.first[:parsed_path_info].to_s end def test_raising_helpful_error_on_invalid_arguments |