Sha256: 33ab88ccabd829e855e9ff34e6a839f67e5d00c778d9006ebc32ad8c16c57497

Contents?: true

Size: 430 Bytes

Versions: 5

Compression:

Stored size: 430 Bytes

Contents

require "spec_helper"

describe Mongoid::Relations::Macros do
  describe ".embedded_in" do
    context "when the document is versioned" do
      it "raises an error" do
        expect {
          Class.new do
            include Mongoid::Document
            include Mongoid::Versioning
            embedded_in :parent_class
          end
        }.to raise_error(Mongoid::Errors::VersioningNotOnRoot)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mongoid-versioning-1.2.0 spec/mongoid/relations/macros_spec.rb
mongoid-versioning-1.1.0 spec/mongoid/relations/macros_spec.rb
mongoid-versioning-1.0.0 spec/mongoid/relations/macros_spec.rb
mongoid-versioning-1.0.0.beta2 spec/mongoid/relations/macros_spec.rb
mongoid-versioning-1.0.0.beta1 spec/mongoid/relations/macros_spec.rb