Sha256: c6970c03b8caa8cca1c449af8ad4d015f55bbefad06dd905c438a9f30a7d6e34

Contents?: true

Size: 765 Bytes

Versions: 4

Compression:

Stored size: 765 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

require "spec_helper"

describe Mongoid::Errors::NoClientConfig do

  describe "#message" do

    let(:error) do
      described_class.new(:secondary)
    end

    it "contains the problem in the message" do
      expect(error.message).to include(
        "No configuration could be found for a client named 'secondary'."
      )
    end

    it "contains the summary in the message" do
      expect(error.message).to include(
        "When attempting to create the new client, Mongoid could not find a client"
      )
    end

    it "contains the resolution in the message" do
      expect(error.message).to include(
        "Double check your mongoid.yml to make sure under the clients"
      )
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-7.1.2 spec/mongoid/errors/no_client_config_spec.rb
mongoid-7.1.1 spec/mongoid/errors/no_client_config_spec.rb
mongoid-7.1.0 spec/mongoid/errors/no_client_config_spec.rb
mongoid-7.1.0.rc0 spec/mongoid/errors/no_client_config_spec.rb