b0VIM 7.3u 14, 'web/firefox' => 3, 'web/firefox/3' => 3, 'web/ie' => 7, 'web/ie/6' => 5, 'web/ie/5' => 2, 'web/chrome' => 4, 'web/chrome/11' => 4 { subject.find("views/product", 2.hours.ago, Time.now).all('15.minutes').should == [ } 'web/chrome/11' => 4 'web/chrome' => 4, 'web/ie/5' => 2, 'web/ie/6' => 5, 'web/ie' => 7, 'web/firefox/3' => 3, 'web/firefox' => 3, 'web' => 14, subject.find("views/product", 2.hours.ago, Time.now).total.should == { subject.store("views/product/11", {"web/chrome/11"=> 2}, 5.hours.ago) Timecop.travel(30.minutes) # 03:15:00 subject.store("views/product/11", {"web/chrome/11"=> 4}, 30.minutes.ago) Timecop.travel(30.minutes) # 02:45:00 subject.store("views/product/11", {"web/ie/5" => 2}) Timecop.travel(5.minutes) # 02:15:00 subject.store("views/product/15", {"web/ie/6" => 2}) Timecop.travel(5.minutes) # 02:10:00 subject.store("views/product/15", {"web/ie/6" => 3}) Timecop.travel(5.minutes) #02:05:00 subject.store("views/product/13", {"web/firefox/3" => 2}, Time.now) Timecop.travel(2.hours) #02:00:00 subject.store("views/product/15", {"web/firefox/3" => 1}) Timecop.travel(start_time) start_time = Time.local(2001, 1, 1, 1, 0, 0) it "should be similar to redistat" do end subject.flushdb before(:each) dodescribe Redis::Timeseries dorequire 'redis/timeseries'require 'timecop'require 'spec_helper'