Sha256: 2f6258673b6abc6c833f8fe86dc60f6b9ec1fd2995c2482b5a80998c368a4f26

Contents?: true

Size: 581 Bytes

Versions: 14

Compression:

Stored size: 581 Bytes

Contents

require "spec_helper"

describe Mongoid::Association::Embedded::EmbeddedIn::Buildable do

  describe "#build" do

    let(:base) do
      double
    end

    let(:options) do
      { }
    end

    let(:association) do
      Mongoid::Association::Embedded::EmbeddedIn.new(Person, :addresses, options)
    end

    context "when a document is provided" do

      let(:object) do
        double
      end

      let(:document) do
        association.build(base, object)
      end

      it "returns the document" do
        expect(document).to eq(object)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mongoid-7.0.13 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.12 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.11 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.10 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.8 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.7 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.6 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.5 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.4 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.3 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.2 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.1 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.0 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.0.0.beta spec/mongoid/association/embedded/embedded_in/buildable_spec.rb