diff --git a/spec/rubocop/cop/style/class_methods_spec.rb b/spec/rubocop/cop/style/class_methods_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rubocop/cop/style/class_methods_spec.rb
+++ b/spec/rubocop/cop/style/class_methods_spec.rb
@@ -43,7 +43,7 @@ describe Rubocop::Cop::Style::ClassMethods do
 
   it 'does not register an offense outside class/module bodies' do
     inspect_source(cop,
-                   ['def self.some_method',
+                   ['def Test.some_method',
                     '  do_something',
                     'end'])
     expect(cop.offenses).to be_empty
proper failing test case for ClassMethods