Sha256: a021123233d18b5c7fb8e8f5b277f39b48deaec144058dfa7a2b41f645b4f62d

Contents?: true

Size: 678 Bytes

Versions: 15

Compression:

Stored size: 678 Bytes

Contents

# encoding: utf-8
require 'spec_helper'
require 'logstash/settings'

describe LogStash::Setting::DeprecatedAndRenamed do
  subject(:setting) { described_class.new("option.deprecated", "option.current") }
  let(:value) { Object.new }

  describe '#set' do
    it 'fails with deprecation runtime error and helpful guidance' do
      expect { setting.set(value) }.to raise_exception do |exception|
        expect(exception).to be_a_kind_of(ArgumentError)
        expect(exception.message).to match(/deprecated and removed/)
        expect(exception.message).to include("option.deprecated")
        expect(exception.message).to include("option.current")
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
logstash-core-7.5.2-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.5.1-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.5.0-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.4.2-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.4.1-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.4.0-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.3.2-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.3.1-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.3.0-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.2.1-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.2.0-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.1.1-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.1.0-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.0.1-java spec/logstash/settings/deprecated_and_renamed_spec.rb
logstash-core-7.0.0-java spec/logstash/settings/deprecated_and_renamed_spec.rb