Sha256: 47724013347ef55c55fa988604affdb517a4b1410deb1140ee8af0c779c5f39b
Contents?: true
Size: 590 Bytes
Versions: 1
Compression:
Stored size: 590 Bytes
Contents
require 'helper' describe "Mongo atomic adapter" do before do @client = Mongo::MongoClient.new.db('test')['test'] @adapter = Adapter[adapter_name].new(@client) @adapter.clear end let(:adapter_name) { :mongo_atomic } let(:adapter) { @adapter } let(:client) { @client } it_should_behave_like 'a mongo adapter' it "allows updating only part of a document" do oid = BSON::ObjectId.new adapter.write(oid, {'a' => 'c', 'b' => 'd'}) adapter.write(oid, {'a' => 'z'}) adapter.read(oid).should eq({ 'a' => 'z', 'b' => 'd', }) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
adapter-mongo-0.8.0 | spec/mongo_atomic_spec.rb |