spec/daijobu/adapters/tokyo_tyrant_spec.rb in sander6-daijobu-0.1.1 vs spec/daijobu/adapters/tokyo_tyrant_spec.rb in sander6-daijobu-0.2.0
- old
+ new
@@ -10,9 +10,22 @@
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')
\ No newline at end of file