can has cheezburger? (thanks Seivan)

This commit is contained in:
Ryan Bates
2010-04-20 14:24:26 -07:00
parent 5aa6252df6
commit 4da31c0709
2 changed files with 7 additions and 0 deletions

View File

@@ -188,4 +188,10 @@ describe CanCan::Ability do
it "should return false when performed on an action which isn't defined" do
@ability.conditions(:foo, Array).should == false
end
it "should has eated cheezburger" do
lambda {
@ability.can? :has, :cheezburger
}.should raise_exception(CanCan::Error, "Nom nom nom. I eated it.")
end
end