Sha256: 47f534ae34d33e8a3f83df01f55904772059a3b9c0a9cf3e0a23c837f9c205a8
Contents?: true
Size: 646 Bytes
Versions: 9
Compression:
Stored size: 646 Bytes
Contents
require 'spec_helper' describe Backend do before(:each) {@connection = Redis.new} after(:each) {@connection.flushdb} describe ".summary" do it "call the optimized routine if the proper keys exist" do @connection.zincrby("offenders", 10, "1.1.1.1") @connection.sadd("detected", "950001") Backend.should_receive(:optimized) { [{},{}] } Backend.summary(@connection) end it "calls the standard routine if they don't" do @connection.del("offenders") @connection.sadd("detected", "950001") Backend.should_receive(:standard) { [{},{}] } Backend.summary(@connection) end end end
Version data entries
9 entries across 9 versions & 1 rubygems