Sha256: 7826ebab13b4cdf7c76db5577c07f54bbc01674d5a598b40537818915686a0ca
Contents?: true
Size: 542 Bytes
Versions: 5
Compression:
Stored size: 542 Bytes
Contents
require 'spec_helper' require 'fixtures/models' module CanTango::Ability class Base def calculate_rules puts "calc" can :edit, Project cannot :publish, Project end end end describe CanTango::Ability::Base do before do @user = User.new 'krisy', 'krisy@gmail.com' end subject { CanTango::Ability::Base.new @user } specify { subject.can?(:edit, Project).should be_true } specify { subject.cannot?(:publish, Project).should be_true } specify { subject.should be_allowed_to(:edit, Project) } end
Version data entries
5 entries across 5 versions & 1 rubygems