Sha256: 4acf365125f18c9552703144117eafc8e293fb4cca3f26dfad8ee161cc4fd6de
Contents?: true
Size: 738 Bytes
Versions: 67
Compression:
Stored size: 738 Bytes
Contents
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
67 entries across 62 versions & 3 rubygems