Sha256: 0b1cd1fcc0a9eed7906c83ce300053bfe322802a4fd7009e1d073e9bb81b37a4

Contents?: true

Size: 747 Bytes

Versions: 27

Compression:

Stored size: 747 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe Mongoid::Errors::NoClientConfig do

  describe "#message" do

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

    it "contains the problem in the message" do
      expect(error.message).to include(
        "No configuration could be found for a client named 'analytics'."
      )
    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

27 entries across 27 versions & 1 rubygems

Version Path
mongoid-8.1.9 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.0.9 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.8 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.7 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.6 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.0.8 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.5 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.4 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.0.7 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.3 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.2 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.0.6 spec/mongoid/errors/no_client_config_spec.rb
mongoid-7.5.4 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.1 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.0.5 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.1.0 spec/mongoid/errors/no_client_config_spec.rb
mongoid-7.5.3 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.0.4 spec/mongoid/errors/no_client_config_spec.rb
mongoid-8.0.3 spec/mongoid/errors/no_client_config_spec.rb
mongoid-7.5.2 spec/mongoid/errors/no_client_config_spec.rb