Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # File 'lib/factory_girl/factory.rb', line 48
- def self.define (name, options = {})
- instance = Factory.new(name, options)
- yield(instance)
- if parent = options.delete(:parent)
- instance.inherit_from(Factory.factory_by_name(parent))
- end
- self.factories[instance.factory_name] = instance
- end
Add Comment
Please, Sign In to add comment