Sha256: f510e45a58a5fc12f29dde63dec7ed332c35bd9cec925cc494e2aa590f41e3f1

Contents?: true

Size: 295 Bytes

Versions: 6

Compression:

Stored size: 295 Bytes

Contents

require 'spec_helper'

use_roles_strategy :one_role

class User
  include Mongoid::Document  
  include Roles::Mongoid 
  
  strategy :one_role, :default
  role_class :role

  valid_roles_are :admin, :guest, :user
end

def api_name
  :one_role
end

load 'roles_mongoid/strategy/api_examples.rb'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
roles_mongoid-0.3.6 spec/roles_mongoid/strategy/single/one_role_spec.rb
roles_mongoid-0.3.5 spec/roles_mongoid/strategy/single/one_role_spec.rb
roles_mongoid-0.3.4 spec/roles_mongoid/strategy/single/one_role_spec.rb
roles_mongoid-0.3.3 spec/roles_mongoid/strategy/single/one_role_spec.rb
roles_mongoid-0.3.2 spec/roles_mongoid/strategy/single/one_role_spec.rb
roles_mongoid-0.3.1 spec/roles_mongoid/strategy/single/one_role_spec.rb