Sha256: c4597eac3e6bbdae0731a00e6a7de6c57d99aa58114dbcb822cb737007fa84fe

Contents?: true

Size: 709 Bytes

Versions: 3

Compression:

Stored size: 709 Bytes

Contents

require "spec_helper"

describe Mongoid::Errors::NoSessionConfig do

  describe "#message" do

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

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

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

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