Sha256: bd18bd24b1a9aa0980998be2c0f3ddb16b82e5b88af0c4c1a43b9a38f22e76e6

Contents?: true

Size: 730 Bytes

Versions: 14

Compression:

Stored size: 730 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
      expect(error.message).to include(
        "No hosts provided for session configuration: :secondary."
      )
    end

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

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

Version data entries

14 entries across 14 versions & 5 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-4.0.2/spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.2 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.1 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.0 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.0.rc2 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.0.rc1 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.0.beta2 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.0.beta1 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.0.alpha2 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid-4.0.0.alpha1 spec/mongoid/errors/no_session_hosts_spec.rb
sepastian-mongoid-rails4-4.0.1.alpha spec/mongoid/errors/no_session_hosts_spec.rb
sepastian-mongoid-rails4-4.0.0.alpha spec/mongoid/errors/no_session_hosts_spec.rb
mongoid_heroku_stable-4.0.0 spec/mongoid/errors/no_session_hosts_spec.rb
mongoid_rails4-4.0.0 spec/mongoid/errors/no_session_hosts_spec.rb