Sha256: 75734b1daa5014451554d0cff58b12126e7aa73f640c887e9667bffb0a6f8b69

Contents?: true

Size: 542 Bytes

Versions: 3

Compression:

Stored size: 542 Bytes

Contents

require 'authenticate/user'

FactoryGirl.define do
  sequence :email do |n|
    "user#{n}@example.com"
  end

  factory :user do
    email
    # encrypted_password 'password'
    password 'password'

    trait :without_email do
      email nil
    end

    trait :without_password do
      password nil
      encrypted_password nil
    end

    trait :with_session_token do
      session_token 'this_is_a_big_fake_long_token'
    end

    trait :with_forgotten_password do
      password_reset_token Authenticate::Token.new
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
authenticate-0.2.3 spec/factories/users.rb
authenticate-0.2.2 spec/factories/users.rb
authenticate-0.2.1 spec/factories/users.rb