]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Lint/NestedMethodDefinition in test/unit/lib/redmine/menu_...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:35:38 +0000 (15:35 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:35:38 +0000 (15:35 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18828 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
test/unit/lib/redmine/menu_manager/menu_helper_test.rb

index 4de36934301a865e29e40a03c125c184f4ceea17..874be5b397d359f9c36512a4fb340116fd05496f 100644 (file)
@@ -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'
index 16eb41a11b9432da9db956d3eb1b66a84ed10f4b..da680362ccfc87f28195e9111da9c67e5b29d59b 100644 (file)
@@ -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