Sha256: c26f12d358d7f26f350f38c5d5606949b8f10797e0a75ca53f5465d3b5fcfadd

Contents?: true

Size: 602 Bytes

Versions: 3

Compression:

Stored size: 602 Bytes

Contents

require 'factory_girl'

require 'moblues/data_model/relationship'

FactoryGirl.define do
  factory :relationship, class: Moblues::DataModel::Relationship do
    name 'relationship'
    destination_entity 'DestinationEntity'
    to_many true
    ordered true

    trait :single do
      to_many false
      ordered false
    end

    trait :to_many do
      to_many true
      ordered false
    end

    trait :to_many_ordered do
      to_many true
      ordered true
    end

    initialize_with { new(name: name, destination_entity: destination_entity, to_many: to_many, ordered: ordered) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
moblues-0.4.0 spec/resources/factories/data_model/relationship_factory.rb
moblues-0.3.0 spec/resources/factories/data_model/relationship_factory.rb
moblues-0.2.0 spec/resources/factories/data_model/relationship_factory.rb