FactoryGirl creates incomplete model
问题 Assume that I have a city model where: class city field :full_name, type: String # San Francisco, CA, United States field :_id, type: String, overwrite: true, default: ->{ full_name } end Assume that I have a factory defined in /spec/factories/cities.rb : FactoryGirl.define do factory :city do full_name 'San Francisco, CA, United States' end end Running the following code in one of the specs: city_attrs = { full_name: 'San Francisco, CA, United States' } City.create! city_attrs => #<City _id: