merging with master and resolving a couple conflicts

This commit is contained in:
Ryan Bates
2010-07-19 16:36:01 -07:00
6 changed files with 29 additions and 13 deletions

View File

@@ -68,6 +68,13 @@ describe CanCan::Ability do
@ability.can?(:destroy, 123).should == :modify_called
end
it "should allow deeply nested aliased actions" do
@ability.alias_action :increment, :to => :sort
@ability.alias_action :sort, :to => :modify
@ability.can :modify, :all
@ability.can?(:increment, 123).should be_true
end
it "should return block result for action, object_class, and object for any action" do
@ability.can :manage, :all do |action, object_class, object|
[action, object_class, object]

1
spec/spec.opts Normal file
View File

@@ -0,0 +1 @@
--color