Sha256: 1c6fbf11a3913509fe576221990c4f08ddbeb05add5d583ed043ad57dcefed8d
Contents?: true
Size: 632 Bytes
Versions: 7
Compression:
Stored size: 632 Bytes
Contents
require 'spec_helper' require 'fixtures/models' class AdminPermit < CanTango::UserPermit def initialize ability super end protected def static_rules can :read, Article end end describe CanTango::Permits::UserPermit do let (:user) do User.new 'kris' end let (:ability) do CanTango::Ability.new user end let (:permit) do AdminPermit.new ability end describe 'attributes' do it "should be the permit for the :admin user" do permit.user_type.should == :admin end it "should have an ability" do permit.ability.should be_a(CanTango::Ability) end end end
Version data entries
7 entries across 7 versions & 1 rubygems