Sha256: 8d5e9d1efabc681a92addd3fcd301818d7008614b1be39adf7e4c29f42adf0b0

Contents?: true

Size: 369 Bytes

Versions: 5

Compression:

Stored size: 369 Bytes

Contents

def default_user_setup
  @guest_user = User.create(:name => 'Guest user')
  @guest_user.add_roles :guest      
  @guest_user.save     

  @normal_user = User.create(:name => 'Normal user')
  @normal_user.roles = :guest, :user
  @normal_user.save     

  @admin_user = User.create(:name => 'Admin user')
  @admin_user.roles = :admin            
  @admin_user.save  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
roles_data_mapper-0.3.1 spec/roles_data_mapper/strategy/user_setup.rb
roles_data_mapper-0.3.0 spec/roles_data_mapper/strategy/user_setup.rb
roles_data_mapper-0.2.2 spec/roles_data_mapper/strategy/user_setup.rb
roles_data_mapper-0.2.1 spec/roles_data_mapper/strategy/user_setup.rb
roles_data_mapper-0.2.0 spec/roles_data_mapper/strategy/user_setup.rb