From: Toshi MARUYAMA Date: Tue, 22 Oct 2019 15:35:38 +0000 (+0000) Subject: code cleanup: rubocop: fix Lint/NestedMethodDefinition in test/unit/lib/redmine/menu_... X-Git-Tag: 4.1.0~275 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c54761c690506039e4a478074d4b6be4efd83513;p=redmine.git code cleanup: rubocop: fix Lint/NestedMethodDefinition in test/unit/lib/redmine/menu_manager/menu_helper_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18828 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4de369343..874be5b39 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -379,10 +379,6 @@ Lint/Loop: Exclude: - 'lib/redmine/helpers/gantt.rb' -Lint/NestedMethodDefinition: - Exclude: - - 'test/unit/lib/redmine/menu_manager/menu_helper_test.rb' - Lint/ParenthesesAsGroupedExpression: Exclude: - 'lib/redmine/field_format.rb' diff --git a/test/unit/lib/redmine/menu_manager/menu_helper_test.rb b/test/unit/lib/redmine/menu_manager/menu_helper_test.rb index 16eb41a11..da680362c 100644 --- a/test/unit/lib/redmine/menu_manager/menu_helper_test.rb +++ b/test/unit/lib/redmine/menu_manager/menu_helper_test.rb @@ -29,8 +29,10 @@ class Redmine::MenuManager::MenuHelperTest < Redmine::HelperTest def setup setup_with_controller # Stub the current menu item in the controller - def current_menu_item - :index + self.class_eval do + def current_menu_item + :index + end end end