Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8ec47dcc2d
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 0.411 kb
require 'rubygems'
require 'pathname'
root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path = root_path.join('lib')
$:.unshift(lib_path)
require 'adapter/mongo'
key = BSON::OrderedHash['s' => 1, 'n' => 1]
client = Mongo::Connection.new.db('adapter')['testing']
adapter = Adapter[:mongo].new(client)
adapter.clear
adapter.write(key, :v => 1)
doc = adapter.read(key)
puts doc.inspect
Jump to Line
Something went wrong with that request. Please try again.