Sha256: 8b61f056d5b286f5ace13883dd7bd14ed65d9dc1d31bd2d1a012d1bfda475ea8
Contents?: true
Size: 921 Bytes
Versions: 2
Compression:
Stored size: 921 Bytes
Contents
FactoryGirl.define do factory :authentication_devise_user, :class => Refinery::Authentication::Devise::User do sequence(:username) { |n| "refinery#{n}" } sequence(:email) { |n| "refinery#{n}@example.com" } password "refinerycms" password_confirmation "refinerycms" end factory :authentication_devise_refinery_user, :parent => :authentication_devise_user do roles { [ ::Refinery::Authentication::Devise::Role[:refinery] ] } after(:create) do |user| ::Refinery::Plugins.registered.each_with_index do |plugin, index| user.plugins.create(:name => plugin.name, :position => index) end end end factory :authentication_devise_refinery_superuser, :parent => :authentication_devise_refinery_user do roles { [ ::Refinery::Authentication::Devise::Role[:refinery], ::Refinery::Authentication::Devise::Role[:superuser] ] } end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
refinerycms-contacts-0.2.0 | spec/factories/user.rb |
refinerycms-photo-gallery-0.2.0 | spec/factories/user.rb |