Sha256: 89777b0487e7dd4fc47fc908b2ef0b503a1f5335d0e2bb439c91acdb6e33841d
Contents?: true
Size: 800 Bytes
Versions: 29
Compression:
Stored size: 800 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Mongoid::Errors::AmbiguousRelationship do describe "#message" do let(:error) do described_class.new(Person, Drug, :person, [ :drugs, :evil_drugs ]) end it "contains the problem in the message" do expect(error.message).to include( "Ambiguous associations :drugs, :evil_drugs defined on Person." ) end it "contains the summary in the message" do expect(error.message).to include( "When Mongoid attempts to set an inverse document of an association in memory" ) end it "contains the resolution in the message" do expect(error.message).to include( "On the :person association on Drug you must add an :inverse_of option" ) end end end
Version data entries
29 entries across 29 versions & 1 rubygems