Sha256: ff73cfa06bcf55cbb258c5e9b7f3a89b51050970125d3787c730c2db2108787e
Contents?: true
Size: 850 Bytes
Versions: 21
Compression:
Stored size: 850 Bytes
Contents
require 'spec_helper' require 'fixtures/models' class AdminsRoleGroupPermit < CanTango::RoleGroupPermit def initialize ability super end protected def static_rules end end describe CanTango::PermitEngine::Factory do before do CanTango.config.cache_engine.set :off end let (:user) do User.new 'kris' end let (:user_account) do ua = UserAccount.new user, :role_groups => [:admins] user.account = ua end let (:ability) do CanTango::Ability.new user_account end let (:factory) do CanTango::PermitEngine::Factory.new ability end describe 'attributes' do it "should have an ability" do factory.ability.should be_a(CanTango::Ability) end end describe '#build!' do it 'should build a list of permits' do factory.build!.should_not be_empty end end end
Version data entries
21 entries across 21 versions & 1 rubygems