Sha256: df9ecd9a8f08ea798775d9567ded50acdab4c8c5af225b93ffbb18f6ead78fdd

Contents?: true

Size: 691 Bytes

Versions: 3

Compression:

Stored size: 691 Bytes

Contents

require "spec_helper"

describe Mongoid::Errors::NoEnvironment do

  describe "#message" do

    let(:error) do
      described_class.new
    end

    it "contains the problem in the message" do
      error.message.should include(
        "Could not load the configuration since no environment was defined."
      )
    end

    it "contains the summary in the message" do
      error.message.should include(
        "Mongoid attempted to find the appropriate environment but no Rails.env"
      )
    end

    it "contains the resolution in the message" do
      error.message.should include(
        "Make sure some environment is set from the mentioned options"
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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