spec/unit/grantee_spec.rb in cancannible-0.0.2 vs spec/unit/grantee_spec.rb in cancannible-1.0.0

- old
+ new

@@ -41,12 +41,16 @@ describe "#cannot?" do subject { grantee.cannot?(:read, resource) } context "when permission is not asserted" do it { should be_truthy } end - context "when permission is not asserted but can is" do + context "when :can already asserted" do before { grantee.can(:read, resource) } it { should be_falsey } + context "and then reset as :cannot" do + before { grantee.cannot(:read, resource) } + it { should be_truthy } + end end context "when permission is asserted" do before { grantee.cannot(:read, resource) } it { should be_truthy } end \ No newline at end of file