Sha256: 8573365786f2616f87627baaeb24bb17fe3ea29c4d0a03f03b8dd5ad74bd5110

Contents?: true

Size: 718 Bytes

Versions: 3

Compression:

Stored size: 718 Bytes

Contents

require "spec_helper"

describe Mongoid::Errors::NoSessionHosts do

  describe "#message" do

    let(:error) do
      described_class.new(:secondary, { database: "mongoid_test" })
    end

    it "contains the problem in the message" do
      error.message.should include(
        "No hosts provided for session configuration: :secondary."
      )
    end

    it "contains the summary in the message" do
      error.message.should include(
        "Each session configuration must provide hosts so Mongoid"
      )
    end

    it "contains the resolution in the message" do
      error.message.should include(
        "If configuring via a mongoid.yml, ensure that within your :secondary"
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongoid-3.1.7 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-3.1.6 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-3.1.5 spec/mongoid/errors/no_session_hosts_spec.rb