Sha256: e17d6032f1d2800bc0a7d1d77afd807136e736fa8b41237936016ed69cd51088
Contents?: true
Size: 743 Bytes
Versions: 2
Compression:
Stored size: 743 Bytes
Contents
require 'spec_helper' describe Memdash do before do Memdash.ttl = 2 end it 'records gets' do expect{ dalli.get('key') }.to change{ reports_count }.by(1) end it 'waits between recording gets' do dalli.get('key') sleep 1 expect{ dalli.get('key') }.to_not change{ reports_count } sleep 2 expect{ dalli.get('key') }.to change{ reports_count }.by(1) end it 'records sets' do expect{ dalli.set('key', 'value') }.to change{ reports_count }.by(1) end it 'waits between recording sets' do dalli.set('key', 'value') sleep 1 expect{ dalli.set('key', 'value') }.to_not change{ reports_count } sleep 2 expect{ dalli.set('key', 'value') }.to change{ reports_count }.by(1) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
memdash-0.1.0 | spec/memdash_spec.rb |
memdash-0.0.1 | spec/memdash_spec.rb |