gabrielg-factory_girl 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/factory_girl/factory.rb +1 -1
- metadata +1 -1
data/lib/factory_girl/factory.rb
CHANGED
@@ -252,7 +252,7 @@ class Factory
|
|
252
252
|
instance = build_class.new
|
253
253
|
attrs = build_attributes_hash(override, strategy)
|
254
254
|
attrs.each do |attr, value|
|
255
|
-
instance.send(:"#{attr}=", value)
|
255
|
+
instance.send(:"#{attr}=", value) if instance.respond_to?(:"#{attr}=")
|
256
256
|
end
|
257
257
|
@callbacks[:after_build].call(instance) unless @callbacks[:after_build].nil?
|
258
258
|
instance
|