Sha256: 7b34a1af1f6ec7b0d5f55793edce406e2a138cd30950e603a90dccbadc50aca4

Contents?: true

Size: 1022 Bytes

Versions: 3

Compression:

Stored size: 1022 Bytes

Contents

require "spec_helper"

describe Moped::BSON::Binary do

  describe "#mongoize" do

    let(:binary) do
      Moped::BSON::Binary.new(:md5, "testing")
    end

    it "returns the binary" do
      binary.mongoize.should eq(binary)
    end
  end

  describe ".demongoize" do

    let(:binary) do
      Moped::BSON::Binary.new(:md5, "testing")
    end

    let(:demongoized) do
      Moped::BSON::Binary.demongoize(binary)
    end

    it "returns the binary" do
      demongoized.should eq(binary)
    end
  end

  describe ".evolve" do

    let(:binary) do
      Moped::BSON::Binary.new(:md5, "testing")
    end

    let(:evolved) do
      Moped::BSON::Binary.evolve(binary)
    end

    it "returns the binary" do
      evolved.should eq(binary)
    end
  end

  describe ".mongoize" do

    let(:binary) do
      Moped::BSON::Binary.new(:md5, "testing")
    end

    let(:mongoized) do
      Moped::BSON::Binary.mongoize(binary)
    end

    it "returns the binary" do
      mongoized.should eq(binary)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongoid-3.1.7 spec/mongoid/extensions/binary_spec.rb
mongoid-3.1.6 spec/mongoid/extensions/binary_spec.rb
mongoid-3.1.5 spec/mongoid/extensions/binary_spec.rb