Sha256: 54dd85f43ac89c9ec9d832024c32d7ab098274874f672e804426ec14174e0da6

Contents?: true

Size: 297 Bytes

Versions: 6

Compression:

Stored size: 297 Bytes

Contents

FactoryGirl.define do
  factory :user do
    sequence(:email) {|n| "email-#{srand}@test.com" }
    password 'a password'
    password_confirmation 'a password'
    factory :admin do
      after(:build) do |user|
        def user.groups
          ["admin"]
        end
      end
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
worthwhile-0.1.2 spec/factories/users.rb
worthwhile-0.1.1 spec/factories/users.rb
worthwhile-0.1.0 spec/factories/users.rb
worthwhile-0.0.3 spec/factories/users.rb
worthwhile-0.0.2 spec/factories/users.rb
worthwhile-0.0.1 spec/factories/users.rb