diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -8,7 +8,7 @@ module ActiveRecord
     include ActiveModel::AttributeMethods
 
     included do
-      @attribute_methods_generated = false
+      initialize_generated_modules
       include Read
       include Write
       include BeforeTypeCast
diff --git a/activerecord/test/cases/attribute_methods/read_test.rb b/activerecord/test/cases/attribute_methods/read_test.rb
index <HASH>..<HASH> 100644
--- a/activerecord/test/cases/attribute_methods/read_test.rb
+++ b/activerecord/test/cases/attribute_methods/read_test.rb
@@ -15,13 +15,6 @@ module ActiveRecord
 
           include ActiveRecord::AttributeMethods
 
-          def self.define_attribute_methods
-            # Created in the inherited/included hook for "proper" ARs
-            @attribute_methods_mutex ||= Mutex.new
-
-            super
-          end
-
           def self.column_names
             %w{ one two three }
           end
initialize generated modules on inclusion and on inheritence