From c42db41f54adbcd981cbd4cc725e342fb3591176 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 17 Aug 2015 16:30:53 -0700 Subject: routes are always constructed with a hash for the conditions --- actionpack/test/controller/resources_test.rb | 2 +- actionpack/test/dispatch/mapper_test.rb | 4 ++-- actionpack/test/journey/route_test.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack') diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index 04d6cc1792..2bdbbad38c 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -505,7 +505,7 @@ class ResourcesTest < ActionController::TestCase routes = @routes.routes routes.each do |route| routes.each do |r| - next if route === r # skip the comparison instance + next if route == r # skip the comparison instance assert_not_equal [route.conditions, route.path.spec.to_s], [r.conditions, r.path.spec.to_s] end end diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb index eca4ca8e0e..f35ffd8845 100644 --- a/actionpack/test/dispatch/mapper_test.rb +++ b/actionpack/test/dispatch/mapper_test.rb @@ -82,7 +82,7 @@ module ActionDispatch end assert_equal({:omg=>:awesome, :controller=>"posts", :action=>"index"}, fakeset.defaults.first) - assert_equal(/^GET$/, fakeset.conditions.first[:request_method]) + assert_equal(/^GET$/, fakeset.routes.first.verb) end def test_mapping_requirements @@ -99,7 +99,7 @@ module ActionDispatch mapper.scope(via: :put) do mapper.match '/', :to => 'posts#index', :as => :main end - assert_equal(/^PUT$/, fakeset.conditions.first[:request_method]) + assert_equal(/^PUT$/, fakeset.routes.first.verb) end def test_map_slash diff --git a/actionpack/test/journey/route_test.rb b/actionpack/test/journey/route_test.rb index dcb82a6741..22c3b8113d 100644 --- a/actionpack/test/journey/route_test.rb +++ b/actionpack/test/journey/route_test.rb @@ -28,7 +28,7 @@ module ActionDispatch def test_path_requirements_override_defaults path = Path::Pattern.build(':name', { name: /love/ }, '/', true) defaults = { name: 'tender' } - route = Route.build('name', nil, path, nil, [], defaults) + route = Route.build('name', nil, path, {}, [], defaults) assert_equal(/love/, route.requirements[:name]) end -- cgit v1.2.3