Sha256: 5f70e91482690cb162c65bb7d0f8645d73c3f1a905c43908e05917ffacd5446c

Contents?: true

Size: 1.78 KB

Versions: 31

Compression:

Stored size: 1.78 KB

Contents

require 'factory_girl'

FactoryGirl.define do
  factory :address, :class => Effective::Address do
    category 'billing'
    full_name nil
    sequence(:address1) { |n| "1234#{n} Fake Street" }
    city 'San Antonio'
    state_code 'TX'
    country_code 'US'
    postal_code '92387'
  end

  factory :address_with_full_name, :class => Effective::Address do
    category 'billing'
    full_name 'Peter Pan'
    sequence(:address1) { |n| "1234#{n} Fake Street" }
    city 'San Antonio'
    state_code 'TX'
    country_code 'US'
    postal_code '92387'
  end

  factory :user do
    sequence(:email) { |n| "user_#{n}@effective_addresses.test"}
    sequence(:first_name) { |n| "First Name #{n}"}
    sequence(:last_name) { |n| "Last Name #{n}"}
  end

  factory :user_with_address do
    sequence(:email) { |n| "user_#{n}@effective_addresses.test"}
    sequence(:first_name) { |n| "First Name #{n}"}
    sequence(:last_name) { |n| "Last Name #{n}"}
  end

  factory :user_with_required_address do
    sequence(:email) { |n| "user_#{n}@effective_addresses.test"}
    sequence(:first_name) { |n| "First Name #{n}"}
    sequence(:last_name) { |n| "Last Name #{n}"}
  end

  factory :user_with_required_full_name do
    sequence(:email) { |n| "user_#{n}@effective_addresses.test"}
    sequence(:first_name) { |n| "First Name #{n}"}
    sequence(:last_name) { |n| "Last Name #{n}"}
  end

  factory :user_with_required_address_and_full_name do
    sequence(:email) { |n| "user_#{n}@effective_addresses.test"}
    sequence(:first_name) { |n| "First Name #{n}"}
    sequence(:last_name) { |n| "Last Name #{n}"}
  end

  factory :user_with_singular_address do
    sequence(:email) { |n| "user_#{n}@effective_addresses.test"}
    sequence(:first_name) { |n| "First Name #{n}"}
    sequence(:last_name) { |n| "Last Name #{n}"}
  end

end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
effective_addresses-1.3.5 spec/support/factories.rb
effective_addresses-1.3.4 spec/support/factories.rb
effective_addresses-1.3.2 spec/support/factories.rb
effective_addresses-1.3.1 spec/support/factories.rb
effective_addresses-1.3.0 spec/support/factories.rb
effective_addresses-1.2.4 spec/support/factories.rb
effective_addresses-1.2.3 spec/support/factories.rb
effective_addresses-1.2.2 spec/support/factories.rb
effective_addresses-1.2.1 spec/support/factories.rb
effective_addresses-1.2.0 spec/support/factories.rb
effective_addresses-1.1.0 spec/support/factories.rb