From 4a37cd0dc08ccef417a423b3a9a91b33c26c4199 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Tue, 28 Aug 2018 16:02:48 +0200 Subject: Minor renames for clarity --- rubocop/cop/prefer_class_methods_over_module.rb | 4 ++-- spec/rubocop/cop/prefer_class_methods_over_module_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rubocop/cop/prefer_class_methods_over_module.rb b/rubocop/cop/prefer_class_methods_over_module.rb index 5097dc7829d..0dfa80ccfab 100644 --- a/rubocop/cop/prefer_class_methods_over_module.rb +++ b/rubocop/cop/prefer_class_methods_over_module.rb @@ -36,7 +36,7 @@ module RuboCop PATTERN def on_module(node) - add_offense(node) if node.defined_module_name == 'ClassMethods' && extends_activesupport_concern?(node) + add_offense(node) if node.defined_module_name == 'ClassMethods' && module_extends_activesupport_concern?(node) end def autocorrect(node) @@ -47,7 +47,7 @@ module RuboCop private - def extends_activesupport_concern?(node) + def module_extends_activesupport_concern?(node) container_module = container_module_of(node) return false unless container_module diff --git a/spec/rubocop/cop/prefer_class_methods_over_module_spec.rb b/spec/rubocop/cop/prefer_class_methods_over_module_spec.rb index ec60a651f31..4739f0e6c47 100644 --- a/spec/rubocop/cop/prefer_class_methods_over_module_spec.rb +++ b/spec/rubocop/cop/prefer_class_methods_over_module_spec.rb @@ -93,6 +93,6 @@ describe RuboCop::Cop::PreferClassMethodsOverModule do end end RUBY - expect(autocorrected).to eql(expected_source) + expect(autocorrected).to eq(expected_source) end end -- cgit v1.2.1