Fix randomly failing specs.

This commit is contained in:
Guo Xiang Tan 2017-03-14 16:28:05 +08:00
parent 58de40154d
commit 685c26961f
1 changed files with 1 additions and 1 deletions

View File

@ -5,8 +5,8 @@ describe Jobs::AboutStats do
begin begin
stats = About.fetch_stats.to_json stats = About.fetch_stats.to_json
cache_key = About.stats_cache_key cache_key = About.stats_cache_key
$redis.del(cache_key)
expect($redis.get(cache_key)).to eq(nil)
expect(described_class.new.execute({})).to eq(stats) expect(described_class.new.execute({})).to eq(stats)
expect($redis.get(cache_key)).to eq(stats) expect($redis.get(cache_key)).to eq(stats)
ensure ensure