Sha256: 637554e85e4f979c523e62cab6a7d981383b47ed3de101a0180b3ed0aadf81a0

Contents?: true

Size: 443 Bytes

Versions: 1

Compression:

Stored size: 443 Bytes

Contents

require 'spec_helper'
use_roles_strategy :admin_flag

class User 
  include DataMapper::Resource  
  include Roles::DataMapper 
  
  strategy :admin_flag, :default

  property :id, Serial
  property :name, String  
end

DataMapper.finalize
DataMapper.auto_migrate!

User.valid_roles_are :admin, :guest  

describe "Roles for DataMapper: :admin_flag strategy" do
  require "roles_data_mapper/user_setup"
  require "roles_generic/rspec/api"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
roles_data_mapper-0.1.3 spec/roles_data_mapper/strategy/admin_flag_spec.rb