Sha256: ddb0ad65d60f20683ced31690feb57bb2be064f50c00e52a738b89430f59b6cc

Contents?: true

Size: 630 Bytes

Versions: 27

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

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

27 entries across 27 versions & 2 rubygems

Version Path
mongoid-7.3.5 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.3.4 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.1.11 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.2.6 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.3.3 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.3.2 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.2.5 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.1.10 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.1.9 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.2.4 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.3.1 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/mongoid-7.1.7/spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.3.0 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.2.3 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.1.8 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.2.2 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.2.1 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.1.7 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.2.0 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb
mongoid-7.1.6 spec/mongoid/association/embedded/embedded_in/buildable_spec.rb