Sha256: b34424158ec7022d364ef8a7581a82473c09b049abd2f5180681b97f836c3387
Contents?: true
Size: 787 Bytes
Versions: 27
Compression:
Stored size: 787 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 require "spec_helper" describe Mongoid::Errors::DocumentNotDestroyed do describe "#message" do let(:post) do Post.new end let(:error) do described_class.new(post.id, Post) end it "contains the problem in the message" do expect(error.message).to include( "Post with id #{post.id.inspect} was not destroyed" ) end it "contains the summary in the message" do expect(error.message).to include( "When calling Post#destroy! and a callback halts the destroy callback" ) end it "contains the resolution in the message" do expect(error.message).to include( "Check the before/after destroy callbacks to ensure" ) end end end
Version data entries
27 entries across 27 versions & 2 rubygems