diff options
author | Xavier Noria <fxn@hashref.com> | 2016-09-01 23:41:49 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-09-01 23:41:49 +0200 |
commit | bb1ecdcc677bf6e68e0252505509c089619b5b90 (patch) | |
tree | 99dd8fd164e1c582216a4b08c3d066049217bb7f /actionpack/test | |
parent | 8c402ef425771c3dbb4659dd946714e69fdf5ce9 (diff) | |
download | rails-bb1ecdcc677bf6e68e0252505509c089619b5b90.tar.gz rails-bb1ecdcc677bf6e68e0252505509c089619b5b90.tar.bz2 rails-bb1ecdcc677bf6e68e0252505509c089619b5b90.zip |
fixes remaining RuboCop issues [Vipul A M, Xavier Noria]
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" |