Sha256: 7424ba2914c15e5bd6959f6828fba0d3470a171632fb41d57e636f03964e7a6f
Contents?: true
Size: 628 Bytes
Versions: 1
Compression:
Stored size: 628 Bytes
Contents
require 'spec_helper' module FakeRedis describe 'time' do before(:each) do @client = Redis.new allow(Time).to receive_message_chain(:now, :to_f).and_return(1397845595.5139461) end it 'is an array' do expect(@client.time).to be_an_instance_of(Array) end it 'has two elements' do expect(@client.time.count).to eql 2 end if fakeredis? it 'has the current time in seconds' do expect(@client.time.first).to eql 1397845595 end it 'has the current leftover microseconds' do expect(@client.time.last).to eql 513946 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kuende-fakeredis-0.6.0 | spec/memory_spec.rb |