From bb1ecdcc677bf6e68e0252505509c089619b5b90 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 1 Sep 2016 23:41:49 +0200 Subject: fixes remaining RuboCop issues [Vipul A M, Xavier Noria] --- actionpack/test/controller/render_test.rb | 2 +- actionpack/test/controller/routing_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/test/controller') 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| -- cgit v1.2.3