diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index bf83131189..399c7489b7 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -226,7 +226,7 @@ class TestController < ActionController::Base end def head_and_return - head :ok and return + head(:ok) && return raise "should not reach this line" end diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index d1cc0f7d68..7be2ad2b28 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -211,7 +211,7 @@ class LegacyRouteSetTests < ActiveSupport::TestCase def test_class_and_lambda_constraints subdomain = Class.new { def matches?(request) - request.subdomain.present? and request.subdomain != "clients" + request.subdomain.present? && request.subdomain != "clients" end } @@ -229,7 +229,7 @@ class LegacyRouteSetTests < ActiveSupport::TestCase def test_lambda_constraints rs.draw do get "/", constraints: lambda { |req| - req.subdomain.present? and req.subdomain != "clients" }, + req.subdomain.present? && req.subdomain != "clients" }, to: lambda { |env| [200, {}, %w{default}] } get "/", constraints: lambda { |req| diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 0938460632..eec34dba66 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -3672,12 +3672,12 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest def test_multiple_roots draw do namespace :foo do - root "pages#index", constraints: { host: 'www.example.com' } - root "admin/pages#index", constraints: { host: 'admin.example.com' } + root "pages#index", constraints: { host: "www.example.com" } + root "admin/pages#index", constraints: { host: "admin.example.com" } end - root "pages#index", constraints: { host: 'www.example.com' } - root "admin/pages#index", constraints: { host: 'admin.example.com' } + root "pages#index", constraints: { host: "www.example.com" } + root "admin/pages#index", constraints: { host: "admin.example.com" } end get "http://www.example.com/foo" |