summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-22 15:35:38 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-22 15:35:38 +0000
commitc54761c690506039e4a478074d4b6be4efd83513 (patch)
tree72d361f5ee61f05af2a4e2e62b011dee3f9a59eb
parentf0a8ef42f6d159cc139664ac6ccde0079524372c (diff)
downloadredmine-c54761c690506039e4a478074d4b6be4efd83513.tar.gz
redmine-c54761c690506039e4a478074d4b6be4efd83513.zip
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
-rw-r--r--.rubocop_todo.yml4
-rw-r--r--test/unit/lib/redmine/menu_manager/menu_helper_test.rb6
2 files changed, 4 insertions, 6 deletions
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