Sha256: 599606dc5242454185ca530e5c2f5dd2a99b60a6b7d297980efd88fef4cec2f7

Contents?: true

Size: 368 Bytes

Versions: 10

Compression:

Stored size: 368 Bytes

Contents

RSpec.describe Flipper::Expressions::Percentage do
  describe "#call" do
    it "returns numeric" do
      expect(described_class.call(10)).to be(10.0)
    end

    it "returns 0 if less than 0" do
      expect(described_class.call(-1)).to be(0)
    end

    it "returns 100 if greater than 100" do
      expect(described_class.call(101)).to be(100)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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