Sha256: af57b20d4185c5f2cf573245da2ce842293833935b68b5adc1d6c4c4b56e21c5

Contents?: true

Size: 673 Bytes

Versions: 73

Compression:

Stored size: 673 Bytes

Contents

require "spec_helper"

describe Mongoid::Errors::InvalidConfigOption do

  describe "#message" do

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

    it "contains the problem in the message" do
      expect(error.message).to include(
        "Invalid configuration option: bad_option."
      )
    end

    it "contains the summary in the message" do
      expect(error.message).to include(
        "A invalid configuration option was provided in your mongoid.yml,"
      )
    end

    it "contains the resolution in the message" do
      expect(error.message).to include(
        "Remove the invalid option or fix the typo."
      )
    end
  end
end

Version data entries

73 entries across 68 versions & 6 rubygems

Version Path
mongoid-6.0.1 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.1.5 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-6.0.0 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.1.4 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-6.0.0.rc0 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-6.0.0.beta spec/mongoid/errors/invalid_config_option_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-5.1.3/spec/mongoid/errors/invalid_config_option_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-4.0.2/spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.1.3 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.1.2 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.1.1 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.1.0 spec/mongoid/errors/invalid_config_option_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.1/spec/mongoid/errors/invalid_config_option_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/mongoid-5.0.2/spec/mongoid/errors/invalid_config_option_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.0.2 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.0.1 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.0.0 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.0.0.rc0 spec/mongoid/errors/invalid_config_option_spec.rb
mongoid-5.0.0.beta spec/mongoid/errors/invalid_config_option_spec.rb