Sha256: 510f4de7ee645fd066158e1e28b496c5dbcb3fd159974eaf7245ee99bb1d90fb

Contents?: true

Size: 338 Bytes

Versions: 3

Compression:

Stored size: 338 Bytes

Contents

FactoryGirl.define do
  factory :user do
    password 'password'
    password_confirmation 'password'
    sequence(:email) { |n| "email-#{n}@some.domain" }

    factory :user_with_orders do
      after :create do |user|
        create :order_in_progress, user: user
        create :order_delivered, user: user
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shopping-cart-0.1.2 spec/factories/shopping_cart_users.rb
shopping-cart-0.1.1 spec/factories/shopping_cart_users.rb
shopping-cart-0.1.0 spec/factories/shopping_cart_users.rb