Sha256: 4b350bfa9ed08abf653fa09996078e8fcfffeb4603737488f97e833d59e25326

Contents?: true

Size: 982 Bytes

Versions: 2

Compression:

Stored size: 982 Bytes

Contents

require "spec_helper"

describe BSON::Binary do

  describe "#mongoize" do

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

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

  describe ".demongoize" do

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

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

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

  describe ".evolve" do

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

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

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

  describe ".mongoize" do

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sepastian-mongoid-rails4-4.0.1.alpha spec/mongoid/extensions/binary_spec.rb
sepastian-mongoid-rails4-4.0.0.alpha spec/mongoid/extensions/binary_spec.rb