Sha256: 7e53a4f850f32635cfc28c9c0f9b696edff2d2d699f319d18c2206298b8d8481

Contents?: true

Size: 441 Bytes

Versions: 20

Compression:

Stored size: 441 Bytes

Contents

FactoryGirl.define do

  factory :address, class: Gaku::Address do
    address1 { Faker::Address.street_address }
    address2 { Faker::Address.street_address }
    city     { Faker::Address.city }

    state
    country

    after(:build) do |address|
      if address.addressable.respond_to?(:addresses)
        address.addressable.addresses.reload
      end
    end

    factory :invalid_address  do
      address1 nil
    end
  end

end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
gaku-0.2.4 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.2.4 lib/gaku/testing/factories/address_factory.rb
gaku-0.2.3 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.2.3 lib/gaku/testing/factories/address_factory.rb
gaku-0.2.2 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.2.2 lib/gaku/testing/factories/address_factory.rb
gaku-0.2.1 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.2.1 lib/gaku/testing/factories/address_factory.rb
gaku-0.2.0 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.2.0 lib/gaku/testing/factories/address_factory.rb
gaku-0.1.1 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.1.1 lib/gaku/testing/factories/address_factory.rb
gaku-0.1.0 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.1.0 lib/gaku/testing/factories/address_factory.rb
gaku_core-0.0.3 lib/gaku/testing/factories/address_factory.rb
gaku-0.0.3 core/lib/gaku/testing/factories/address_factory.rb
gaku-0.0.2 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.0.2 lib/gaku/testing/factories/address_factory.rb
gaku-0.0.1 core/lib/gaku/testing/factories/address_factory.rb
gaku_core-0.0.1 lib/gaku/testing/factories/address_factory.rb