Sha256: bcee971740bc816d7af1928e3a5377f84a4733089ccdabbbd622a6ecb2157dc3

Contents?: true

Size: 591 Bytes

Versions: 183

Compression:

Stored size: 591 Bytes

Contents

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

describe LogStash::Setting::Integer do
  subject { described_class.new("a number", nil, false) }
  describe "#set" do
    context "when giving a number which is not an integer" do
      it "should raise an exception" do
        expect { subject.set(1.1) }.to raise_error(ArgumentError)
      end
    end
    context "when giving a number which is an integer" do
      it "should set the number" do
        expect { subject.set(100) }.to_not raise_error
        expect(subject.value).to eq(100)
      end
    end
  end
end

Version data entries

183 entries across 180 versions & 14 rubygems

Version Path
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.9 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.8 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-core-6.8.16-java spec/logstash/settings/integer_spec.rb
logstash-output-scalyr-0.1.6 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-core-6.8.15-java spec/logstash/settings/integer_spec.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-core-6.8.14-java spec/logstash/settings/integer_spec.rb
logstash-core-6.8.13-java spec/logstash/settings/integer_spec.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.2.1-java/spec/logstash/settings/integer_spec.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.2.1-java/spec/logstash/settings/integer_spec.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/settings/integer_spec.rb