Sha256: 0649e9c1981a125161000dd2c25f86bc49a3bae08f1f1605c1fea7888cb8425d
Contents?: true
Size: 601 Bytes
Versions: 5
Compression:
Stored size: 601 Bytes
Contents
require "mongoid/strategy_helper" User.troles_strategy :bit_one do |c| c.valid_roles = [:user, :admin] end.configure! module UserSetup def create_no_roles_user Factory.create :user, :name => 'no roles', :trole => false end def create_user Factory.create :user, :name => 'normal', :trole => false end def create_admin_user Factory.create :user, :name => 'admin', :trole => true end end require 'troles/common/api_spec' # Common API examples describe 'Troles strategy :bit_one' do it_should_behave_like "Common API" # it_should_behave_like "Troles API" end
Version data entries
5 entries across 5 versions & 1 rubygems