Sha256: e0d8383882d9392f3685e9674c0ccee7835280a5708a5439da37b7c35fb90a0c

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

require_relative '../../../lib/common_repository_model/data'

FactoryGirl.define do
  factory :common_repository_model_collection, class: CommonRepositoryModel::Collection do
    before(:create) { |collection|
      area_name = collection.name_of_area_to_assign
      CommonRepositoryModel::Area.find_by_name(area_name) ||
      FactoryGirl.create(:common_repository_model_area, name: area_name)
    }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
common_repository_model-0.1.0 spec/factories/common_repository_model/collection_factory.rb
common_repository_model-0.0.9 spec/factories/common_repository_model/collection_factory.rb