Sha256: 052ad53ce91ce4150763171c5268dba1e43fae786f40642936035af1d51a4039
Contents?: true
Size: 791 Bytes
Versions: 27
Compression:
Stored size: 791 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 require "spec_helper" describe Mongoid::Errors::NestedAttributesMetadataNotFound do describe "#message" do let(:error) do described_class.new(Person, :posts) end it "contains the problem in the message" do expect(error.message).to include( "Could not find metadata for association 'posts' on model: Person." ) end it "contains the summary in the message" do expect(error.message).to include( "When defining nested attributes for an association, Mongoid needs" ) end it "contains the resolution in the message" do expect(error.message).to include( "Make sure that there is an association defined named 'posts' on Person" ) end end end
Version data entries
27 entries across 27 versions & 2 rubygems