aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-17 16:30:53 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-17 16:30:53 -0700
commitc42db41f54adbcd981cbd4cc725e342fb3591176 (patch)
tree4a3d7f70adf3659c89a70d17a3159b72fde8ea12
parent1ce74b009f0a5bbb9e5f5fe1c037c77437fd0be9 (diff)
downloadrails-c42db41f54adbcd981cbd4cc725e342fb3591176.tar.gz
rails-c42db41f54adbcd981cbd4cc725e342fb3591176.tar.bz2
rails-c42db41f54adbcd981cbd4cc725e342fb3591176.zip
routes are always constructed with a hash for the conditions
-rw-r--r--actionpack/test/controller/resources_test.rb2
-rw-r--r--actionpack/test/dispatch/mapper_test.rb4
-rw-r--r--actionpack/test/journey/route_test.rb2
3 files changed, 4 insertions, 4 deletions
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