Sha256: b1e2fce88862da7d62b9f0b877574e8a456251dc14e5955d60c67fce5c44a46d
Contents?: true
Size: 789 Bytes
Versions: 13
Compression:
Stored size: 789 Bytes
Contents
require 'rspec' require 'cantango' require 'fixtures/models' class AdminsRoleGroupPermit < CanTango::RoleGroupPermit def initialize ability super end protected def static_rules end end describe CanTango::Permits::RoleGroupPermit do 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 (:permit) do AdminsRoleGroupPermit.new ability end describe 'attributes' do it "should be the permit for the :admins group" do permit.role_group.should == :admins end it "should have an ability" do permit.ability.should be_a(CanTango::Ability) end end end
Version data entries
13 entries across 13 versions & 1 rubygems