From c81af6ae723ccfcd601032167d7b7f57c5449c33 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Wed, 12 Jun 2019 21:30:49 +0900 Subject: Enable `Layout/EmptyLinesAroundAccessModifier` cop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost. --- actionview/test/actionpack/abstract/abstract_controller_test.rb | 2 +- actionview/test/actionpack/abstract/layouts_test.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'actionview/test/actionpack/abstract') diff --git a/actionview/test/actionpack/abstract/abstract_controller_test.rb b/actionview/test/actionpack/abstract/abstract_controller_test.rb index eecc19d413..2de81596b5 100644 --- a/actionview/test/actionpack/abstract/abstract_controller_test.rb +++ b/actionview/test/actionpack/abstract/abstract_controller_test.rb @@ -230,6 +230,7 @@ module AbstractController class ActionMissingRespondToActionController < AbstractController::Base # No actions + private def action_missing(action_name) self.response_body = "success" @@ -242,7 +243,6 @@ module AbstractController def fail() self.response_body = "fail" end private - def method_for_action(action_name) action_name.to_s != "fail" && action_name end diff --git a/actionview/test/actionpack/abstract/layouts_test.rb b/actionview/test/actionpack/abstract/layouts_test.rb index 72d8e54bf8..15643c161d 100644 --- a/actionview/test/actionpack/abstract/layouts_test.rb +++ b/actionview/test/actionpack/abstract/layouts_test.rb @@ -140,6 +140,7 @@ module AbstractControllerTests def index render template: ActionView::Template::Text.new("Hello symbol!") end + private def hello "overwrite" -- cgit v1.2.3