Sha256: 6949fd4ea39792a8c29476611b783c0ac6d210f9cc7f68086ab4d37c16af987e

Contents?: true

Size: 444 Bytes

Versions: 5

Compression:

Stored size: 444 Bytes

Contents

require 'spec_helper'
use_roles_strategy :roles_mask

class User
  include DataMapper::Resource  
  include Roles::DataMapper 
  
  strategy :roles_mask, :default
  property :id, Serial
  property :name, String   
end

DataMapper.finalize
DataMapper.auto_migrate!

User.valid_roles_are :admin, :guest, :user

# def api_migrate
#   migrate('roles_mask')
# end

def api_name
  :roles_mask
end

load 'roles_data_mapper/strategy/api_examples.rb'


Version data entries

5 entries across 5 versions & 1 rubygems

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