Sha256: 5d7e8cf26b412675c239cabce284e3a1ae290d0bdfee6507fa0151368ee52db0
Contents?: true
Size: 808 Bytes
Versions: 27
Compression:
Stored size: 808 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 require "spec_helper" describe Mongoid::Errors::UnsavedDocument do describe "#message" do let(:base) do Person.new end let(:document) do Post.new end let(:error) do described_class.new(base, document) end it "contains the problem in the message" do expect(error.message).to include( "Attempted to save Post before the parent Person." ) end it "contains the summary in the message" do expect(error.message).to include( "You cannot call create or create! through the association" ) end it "contains the resolution in the message" do expect(error.message).to include( "Make sure to only use create or create!" ) end end end
Version data entries
27 entries across 27 versions & 2 rubygems