diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-06-13 18:36:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-13 18:36:23 +0900 |
commit | 98a57aa5f610bc66af31af409c72173cdeeb3c9e (patch) | |
tree | 77365fa7eab9725d5ca185ae3df03508898596f5 /actionview/test | |
parent | c5ecc338e863e771adcbcd87d5c23ae5e7ca7894 (diff) | |
parent | c81af6ae723ccfcd601032167d7b7f57c5449c33 (diff) | |
download | rails-98a57aa5f610bc66af31af409c72173cdeeb3c9e.tar.gz rails-98a57aa5f610bc66af31af409c72173cdeeb3c9e.tar.bz2 rails-98a57aa5f610bc66af31af409c72173cdeeb3c9e.zip |
Merge pull request #36472 from kamipo/empty_line_only_before_access_modifier
Enable `Layout/EmptyLinesAroundAccessModifier` cop
Diffstat (limited to 'actionview/test')
7 files changed, 2 insertions, 6 deletions
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" diff --git a/actionview/test/actionpack/controller/render_test.rb b/actionview/test/actionpack/controller/render_test.rb index 9b1a720636..64070a9542 100644 --- a/actionview/test/actionpack/controller/render_test.rb +++ b/actionview/test/actionpack/controller/render_test.rb @@ -607,7 +607,6 @@ class TestController < ActionController::Base end private - def set_variable_for_layout @variable_for_layout = nil end diff --git a/actionview/test/activerecord/form_helper_activerecord_test.rb b/actionview/test/activerecord/form_helper_activerecord_test.rb index 34655bfe23..1b196ade6d 100644 --- a/actionview/test/activerecord/form_helper_activerecord_test.rb +++ b/actionview/test/activerecord/form_helper_activerecord_test.rb @@ -58,7 +58,6 @@ class FormHelperActiveRecordTest < ActionView::TestCase end private - def hidden_fields(method = nil) txt = +%{<input name="utf8" type="hidden" value="✓" />} diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index 91052e5ae2..83b089397c 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -1897,7 +1897,6 @@ class FormHelperTest < ActionView::TestCase def test_form_tags_do_not_call_private_properties_on_form_object obj = Class.new do private - def private_property raise "This method should not be called." end diff --git a/actionview/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb index c9c36917d6..d7a7b95ab3 100644 --- a/actionview/test/template/form_options_helper_test.rb +++ b/actionview/test/template/form_options_helper_test.rb @@ -1472,7 +1472,6 @@ class FormOptionsHelperTest < ActionView::TestCase end private - def dummy_posts [ Post.new("<Abe> went home", "<Abe>", "To a little house", "shh!"), Post.new("Babe went home", "Babe", "To a little house", "shh!"), diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 70c5ae6771..80afed96e5 100644 --- a/actionview/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb @@ -803,7 +803,6 @@ class FormTagHelperTest < ActionView::TestCase end private - def root_elem(rendered_content) Nokogiri::HTML::DocumentFragment.parse(rendered_content).children.first # extract from nodeset end |