Sha256: 8bd4e45c336d5984b25aea43755dd4efee61915fad74bd77bee0856d6fb115c6

Contents?: true

Size: 597 Bytes

Versions: 12

Compression:

Stored size: 597 Bytes

Contents

require 'helper'
require 'flipper/types/boolean'

RSpec.describe Flipper::Types::Boolean do
  it "defaults value to true" do
    boolean = Flipper::Types::Boolean.new
    expect(boolean.value).to be(true)
  end

  it "allows overriding default value" do
    boolean = Flipper::Types::Boolean.new(false)
    expect(boolean.value).to be(false)
  end

  it "returns true for nil value" do
    boolean = Flipper::Types::Boolean.new(nil)
    expect(boolean.value).to be(true)
  end

  it "typecasts value" do
    boolean = Flipper::Types::Boolean.new(1)
    expect(boolean.value).to be(true)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
flipper-0.10.2 spec/flipper/types/boolean_spec.rb
flipper-0.10.1 spec/flipper/types/boolean_spec.rb
flipper-0.10.0 spec/flipper/types/boolean_spec.rb
flipper-0.9.2 spec/flipper/types/boolean_spec.rb
flipper-0.9.1 spec/flipper/types/boolean_spec.rb
flipper-0.9.0 spec/flipper/types/boolean_spec.rb
flipper-0.9.0.beta1 spec/flipper/types/boolean_spec.rb
flipper-0.8.0 spec/flipper/types/boolean_spec.rb
flipper-0.7.5 spec/flipper/types/boolean_spec.rb
flipper-0.7.4 spec/flipper/types/boolean_spec.rb
flipper-0.7.3 spec/flipper/types/boolean_spec.rb
flipper-0.7.2 spec/flipper/types/boolean_spec.rb