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.3.5 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.3.4 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.3.3 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.2.5 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.6 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.5 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.2.4 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.3.2 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.0.7 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.2.3 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.3.1 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.3.0 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.3.0.rc2 lib/spree/core/testing_support/factories/address_factory.rb
dup_spree_core-1.3.0.rc1 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.3.0.rc1 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.2.2 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.1.4 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.2.0 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.2.0.rc2 lib/spree/core/testing_support/factories/address_factory.rb
spree_core-1.2.0.rc1 lib/spree/core/testing_support/factories/address_factory.rb