Sha256: 9d601078f98770bb0c5758d721b47cc9e0627d76bbbebea634eb19f6f40520c6

Contents?: true

Size: 817 Bytes

Versions: 10

Compression:

Stored size: 817 Bytes

Contents

RSpec.describe Flipper::Expressions::GreaterThan do
  describe "#call" do
    it "returns false when equal" do
      expect(described_class.call(2, 2)).to be(false)
    end

    it "returns true when greater" do
      expect(described_class.call(2, 1)).to be(true)
    end

    it "returns false when less" do
      expect(described_class.call(1, 2)).to be(false)
    end

    it "returns false when value evaluates to nil" do
      expect(described_class.call(nil, 1)).to be(false)
      expect(described_class.call(1, nil)).to be(false)
    end

    it "raises ArgumentError with no arguments" do
      expect { described_class.call }.to raise_error(ArgumentError)
    end

    it "raises ArgumentError with one argument" do
      expect { described_class.call(10) }.to raise_error(ArgumentError)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flipper-1.3.2 spec/flipper/expressions/greater_than_spec.rb
flipper-1.3.1 spec/flipper/expressions/greater_than_spec.rb
flipper-1.3.0 spec/flipper/expressions/greater_than_spec.rb
flipper-1.3.0.pre spec/flipper/expressions/greater_than_spec.rb
flipper-1.2.2 spec/flipper/expressions/greater_than_spec.rb
flipper-1.2.1 spec/flipper/expressions/greater_than_spec.rb
flipper-1.2.0 spec/flipper/expressions/greater_than_spec.rb
flipper-1.1.2 spec/flipper/expressions/greater_than_spec.rb
flipper-1.1.1 spec/flipper/expressions/greater_than_spec.rb
flipper-1.1.0 spec/flipper/expressions/greater_than_spec.rb