Sha256: 004486f612f0ed1994c97c4cab8a433cbe706a4c091116fbc70af63bc0e615d8
Contents?: true
Size: 576 Bytes
Versions: 10
Compression:
Stored size: 576 Bytes
Contents
# encoding:utf-8 require './test/bson/test_helper' require 'complex' require 'bigdecimal' require 'rational' class BSONTest < Test::Unit::TestCase include BSON def setup @encoder = BSON::BSON_CODER end def assert_doc_pass(doc, options={}) bson = @encoder.serialize(doc) if options[:debug] puts "DEBUGGING DOC:" p bson.to_a puts "DESERIALIZES TO:" end assert_equal @encoder.serialize(doc).to_a, bson.to_a assert_equal doc, @encoder.deserialize(bson) end def test_string assert_doc_pass({:a => "hello"}) end end
Version data entries
10 entries across 10 versions & 2 rubygems