adding to changelog

This commit is contained in:
Ryan Bates
2010-09-21 12:03:16 -07:00
parent c11ffb6fd1
commit 3391c5a0d7
3 changed files with 20 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ describe CanCan::Ability do
end
@ability.can?(:read, :some_symbol).should == true
end
it "should pass nil to a block when no instance is passed" do
@ability.can :read, Symbol do |sym|
sym.should be_nil
@@ -257,7 +257,7 @@ describe CanCan::Ability do
@ability.can?(:read, 1..5).should be_false
@ability.can?(:read, Range).should be_true
end
it "should allow to check ability for Module" do
module B; end
class A; include B; end
@@ -265,7 +265,7 @@ describe CanCan::Ability do
@ability.can?(:read, A).should be_true
@ability.can?(:read, A.new).should be_true
end
it "should pass nil to a block for ability on Module when no instance is passed" do
module B; end
class A; include B; end

View File

@@ -48,7 +48,7 @@ describe CanCan::ActiveRecordAdditions do
# @ability.associations_hash(:read, @model_class).should == [{:too => [:far]}, :foo]
@model_class.accessible_by(@ability).should == :found_records
end
it "should allow to define sql conditions by not hash" do
@ability.can :read, @model_class, :foo => 1
@ability.can :read, @model_class, ['bar = ?', 1]