Sha256: d1c46708acb5f704b3c2071ca4c76b6079eb77eb065ccac9225aa3d9b35e48ce

Contents?: true

Size: 565 Bytes

Versions: 39

Compression:

Stored size: 565 Bytes

Contents

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

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

  it 'allows overriding default value' do
    boolean = described_class.new(false)
    expect(boolean.value).to be(false)
  end

  it 'returns true for nil value' do
    boolean = described_class.new(nil)
    expect(boolean.value).to be(true)
  end

  it 'typecasts value' do
    boolean = described_class.new(1)
    expect(boolean.value).to be(true)
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
flipper-0.22.2 spec/flipper/types/boolean_spec.rb
flipper-0.22.1 spec/flipper/types/boolean_spec.rb
flipper-0.22.0 spec/flipper/types/boolean_spec.rb
flipper-0.21.0 spec/flipper/types/boolean_spec.rb
flipper-0.21.0.rc2 spec/flipper/types/boolean_spec.rb
flipper-0.21.0.rc1 spec/flipper/types/boolean_spec.rb
flipper-0.20.4 spec/flipper/types/boolean_spec.rb
flipper-0.20.3 spec/flipper/types/boolean_spec.rb
flipper-0.20.2 spec/flipper/types/boolean_spec.rb
flipper-0.20.1 spec/flipper/types/boolean_spec.rb
flipper-0.20.0 spec/flipper/types/boolean_spec.rb
flipper-0.20.0.beta3 spec/flipper/types/boolean_spec.rb
flipper-0.20.0.beta2 spec/flipper/types/boolean_spec.rb
flipper-0.20.0.beta1 spec/flipper/types/boolean_spec.rb
flipper-0.19.1 spec/flipper/types/boolean_spec.rb
flipper-0.19.0 spec/flipper/types/boolean_spec.rb
flipper-0.18.0 spec/flipper/types/boolean_spec.rb
flipper-0.17.2 spec/flipper/types/boolean_spec.rb
flipper-0.17.1 spec/flipper/types/boolean_spec.rb
flipper-0.16.2 spec/flipper/types/boolean_spec.rb