Sha256: 56bd224bc6e3095dacf2a613bb702e4422993712c3d26a4f05f4c03d672e2eaf
Contents?: true
Size: 912 Bytes
Versions: 27
Compression:
Stored size: 912 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe Mongoid::Errors::InvalidIncludes do describe "#message" do context "default" do let(:klass) do Band end let(:args) do [ :members ] end let(:error) do described_class.new(klass, args) end it "contains the problem in the message" do expect(error.message).to include( "Invalid includes directive: Band.includes(:members)" ) end it "contains the summary in the message" do expect(error.message).to include( "Eager loading in Mongoid only supports providing arguments to Band.includes" ) end it "contains the resolution in the message" do expect(error.message).to include( "Ensure that each parameter passed to Band.includes is a valid name" ) end end end end
Version data entries
27 entries across 27 versions & 1 rubygems