Sha256: 70cc9ac9b147c9ee2b7b54b8c68d31a843823008c77fb90d86776550dd6f17b6
Contents?: true
Size: 674 Bytes
Versions: 3
Compression:
Stored size: 674 Bytes
Contents
require "spec_helper" describe Mongoid::Errors::UnknownAttribute do describe "#message" do let(:error) do described_class.new(Person, :gender) end it "contains the problem in the message" do error.message.should include( "Attempted to set a value for 'gender' which is not allowed on" ) end it "contains the summary in the message" do error.message.should include( "When setting Mongoid.allow_dynamic_fields to false" ) end it "contains the resolution in the message" do error.message.should include( "You can set Mongoid.allow_dynamic_fields to true" ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongoid-3.1.7 | spec/mongoid/errors/unknown_attribute_spec.rb |
mongoid-3.1.6 | spec/mongoid/errors/unknown_attribute_spec.rb |
mongoid-3.1.5 | spec/mongoid/errors/unknown_attribute_spec.rb |