diff --git a/lib/factory_girl/factory.rb b/lib/factory_girl/factory.rb index 742b30a2e..060e0be51 100644 --- a/lib/factory_girl/factory.rb +++ b/lib/factory_girl/factory.rb @@ -70,7 +70,7 @@ def initialize (name, options = {}) #:nodoc: end def inherit_from(parent) #:nodoc: - @options[:class] = parent.class_name + @options[:class] ||= parent.class_name parent.attributes.each do |attribute| unless attribute_defined?(attribute.name) @attributes << attribute.clone