Sha256: f0edc0576930a9b8ea59a296bb3577403a35706a19f364327cdbe9205df36ff7

Contents?: true

Size: 348 Bytes

Versions: 26

Compression:

Stored size: 348 Bytes

Contents

FactoryGirl.define do

  factory :contact, class: Gaku::Contact do
    data 'gaku@example.com'
    details 'My email'
    contact_type

    after(:build) do |contact|
      if contact.contactable.respond_to?(:contacts)
        contact.contactable.contacts.reload
      end
    end

    factory :invalid_contact do
      data nil
    end
  end

end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
gaku_core-0.3.0 lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.3.0.pre.4 lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.3.0.pre.3 lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.3.0.pre.2 lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.3.0.pre.1 lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.3.0.pre.0 lib/gaku/testing/factories/contact_factory.rb
gaku-0.2.4 core/lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.2.4 lib/gaku/testing/factories/contact_factory.rb
gaku-0.2.3 core/lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.2.3 lib/gaku/testing/factories/contact_factory.rb
gaku-0.2.2 core/lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.2.2 lib/gaku/testing/factories/contact_factory.rb
gaku-0.2.1 core/lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.2.1 lib/gaku/testing/factories/contact_factory.rb
gaku-0.2.0 core/lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.2.0 lib/gaku/testing/factories/contact_factory.rb
gaku-0.1.1 core/lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.1.1 lib/gaku/testing/factories/contact_factory.rb
gaku-0.1.0 core/lib/gaku/testing/factories/contact_factory.rb
gaku_core-0.1.0 lib/gaku/testing/factories/contact_factory.rb