Sha256: 5ca69b272727c5506ffcecc43e65c1c9a153842880fe3ac83fb8a17e316dee02
Contents?: true
Size: 747 Bytes
Versions: 24
Compression:
Stored size: 747 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe Mongoid::Errors::ReadonlyAttribute do describe "#message" do let(:error) do described_class.new(:title, "mr") end it "contains the problem in the message" do expect(error.message).to include( "Attempted to set the readonly attribute 'title' with the value: mr." ) end it "contains the summary in the message" do expect(error.message).to include( "Attributes flagged as readonly via Model.attr_readonly can only" ) end it "contains the resolution in the message" do expect(error.message).to include( "Don't define 'title' as readonly, or do not attempt to update" ) end end end
Version data entries
24 entries across 24 versions & 1 rubygems