Sha256: ba113ff56efb85005c5c0393eae33344a6b0fc1309412dd1968012c057282286

Contents?: true

Size: 501 Bytes

Versions: 37

Compression:

Stored size: 501 Bytes

Contents

FactoryGirl.define do
  factory :address, :class => Spree::Address do
    firstname 'John'
    lastname 'Doe'
    company 'Company'
    address1 '10 Lovely Street'
    address2 'Northwest'
    city   'Herndon'
    zipcode '20170'
    phone '123-456-7890'
    alternative_phone '123-456-7899'

    state  { |address| address.association(:state) }
    country do |address|
      if address.state
        address.state.country
      else
        address.association(:country)
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
spree_core-1.1.3 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.6 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.2 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.2.rc1 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.1 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.0 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.4 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.0.rc2 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.0.rc1 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.3 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.2 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.1 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.0 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.0.rc4 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.0.rc3 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.0.rc2 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.0.rc1 lib/spree/core/testing_support/factories/address_factory.rb