adding a couple things to the changelog

This commit is contained in:
Ryan Bates
2010-10-05 12:00:50 -07:00
parent 18b45d5cfc
commit b0cec5251c
5 changed files with 10 additions and 6 deletions

View File

@@ -324,7 +324,7 @@ describe CanCan::Ability do
end
@ability.should have_block(:read, :foo)
end
it "should know when raw sql is used in conditions" do
@ability.can :read, :foo
@ability.should_not have_raw_sql(:read, :foo)

View File

@@ -56,14 +56,14 @@ describe CanCan::ActiveRecordAdditions do
stub(@model_class).scoped{|*args| args.inspect}
@model_class.accessible_by(@ability).should == :found_records
end
it "should not allow to fetch records when ability with just block present" do
@ability.can :read, @model_class do false end
lambda {
@model_class.accessible_by(@ability)
}.should raise_error(CanCan::Error)
end
it "should not allow to check ability on object when nonhash sql ability definition without block present" do
@ability.can :read, @model_class, ['bar = ?', 1]
lambda {