Sha256: cf2fbedf9cdec10fe3380f5b77b1c74aa6000839aabe895c8671df96785dfea9
Contents?: true
Size: 736 Bytes
Versions: 1
Compression:
Stored size: 736 Bytes
Contents
require 'spec_helper' require 'fixtures/models' class SystemPermit < CanTango::Permit::Special def initialize ability super end protected def calc_rules can :read, Article can :write, Post can :create, Comment :break end end describe CanTango::Executor::Permit::System do before do @user = User.new 'kris', 'kris@mail.ru' @ua = UserAccount.new @user @user.account = @ua @ability = CanTango::Ability::Base.new @user @permit = SystemRolePermit.new @ability @executor = CanTango::Executor::Permit::System.new @permit end describe '#execute!' do describe 'should execute permit' do specify { lambda{ executor.execute! }.should_not raise_error } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cantango-permits-0.1.1 | spec/cantango/executor/special_permit_spec.rb |