Fix expectation on redis cache spec
This commit is contained in:
parent
c2c152ee4b
commit
a3dce03f76
1 changed files with 11 additions and 13 deletions
|
|
@ -7,9 +7,6 @@ require 'spec_helper'
|
||||||
describe RedisCache do
|
describe RedisCache do
|
||||||
before do
|
before do
|
||||||
@redis = MockRedis.new
|
@redis = MockRedis.new
|
||||||
#@redis = Redis.new
|
|
||||||
#@redis.keys.each{|p| @redis.del(p)}
|
|
||||||
|
|
||||||
@cache = RedisCache.new(bob, :created_at)
|
@cache = RedisCache.new(bob, :created_at)
|
||||||
@cache.stub(:redis).and_return(@redis)
|
@cache.stub(:redis).and_return(@redis)
|
||||||
end
|
end
|
||||||
|
|
@ -95,7 +92,8 @@ describe RedisCache do
|
||||||
sql = "long_sql"
|
sql = "long_sql"
|
||||||
order = "created_at DESC"
|
order = "created_at DESC"
|
||||||
@cache.should_receive(:order).and_return(order)
|
@cache.should_receive(:order).and_return(order)
|
||||||
bob.should_receive(:visible_shareables_sql).with(Post,
|
bob.should_receive(:visible_shareable_sql).with(
|
||||||
|
Post,
|
||||||
hash_including(
|
hash_including(
|
||||||
:type => RedisCache.acceptable_types,
|
:type => RedisCache.acceptable_types,
|
||||||
:limit => RedisCache::CACHE_LIMIT,
|
:limit => RedisCache::CACHE_LIMIT,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue