Sha256: 25a8937ade2178d14c58ed40d711ddd757b4889a52ef8a412f4af1643ba07c35

Contents?: true

Size: 353 Bytes

Versions: 2

Compression:

Stored size: 353 Bytes

Contents

require 'spec_helper'

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

DataMapper.finalize
DataMapper.auto_migrate!

User.valid_roles_are :admin, :guest, :user

def api_name
  :many_roles
end

load 'roles_data_mapper/strategy/api_examples.rb'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
roles_data_mapper-0.3.1 spec/roles_data_mapper/strategy/multi/many_roles_spec.rb
roles_data_mapper-0.3.0 spec/roles_data_mapper/strategy/multi/many_roles_spec.rb