Sha256: bf3c435b9101b9644e337c429d3d88f88b12813a01907751ec11ca3f8e19e6ef
Contents?: true
Size: 926 Bytes
Versions: 3
Compression:
Stored size: 926 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe Daijobu::Adapter::TokyoTyrantAdapter do before do @stubby = stub('fake store') @adapter = Daijobu::Adapter::TokyoTyrantAdapter.new(@stubby) end describe "#get" do it "should call #[] on the store" do @stubby.expects(:[]).with('key') @adapter.get('key') end describe "with no arguments" do it "should return nil" do @adapter.get.should be_nil end end describe "with multiple arguments" do it "should call #lget on all the keys" do @stubby.expects(:lget).with(['key1', 'key2', 'key3']) @adapter.get('key1', 'key2', 'key3') end end end describe "set" do it "should call #set on the store and write as raw" do @stubby.expects(:[]=).with('key', 'value') @adapter.set('key', 'value') end end end
Version data entries
3 entries across 3 versions & 1 rubygems