Sha256: e3cd0c76ec4972c4b846182d4d1dd227c82bb1583a38b2675f8dcd79e7f5ac78

Contents?: true

Size: 582 Bytes

Versions: 10

Compression:

Stored size: 582 Bytes

Contents

RSpec.describe Flipper::Expressions::Number do
  describe "#call" do
    it "returns Integer for Integer" do
      expect(described_class.call(10)).to be(10)
    end

    it "returns Float for Float" do
      expect(described_class.call(10.1)).to be(10.1)
      expect(described_class.call(10.0)).to be(10.0)
    end

    it "returns Integer for String" do
      expect(described_class.call('10')).to be(10)
    end

    it "returns Float for String" do
      expect(described_class.call('10.0')).to be(10.0)
      expect(described_class.call('10.1')).to be(10.1)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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