Sha256: ec81756f32c14d21952b092586c08067637fcb3b42655abb0448f463faf85f8f

Contents?: true

Size: 548 Bytes

Versions: 32

Compression:

Stored size: 548 Bytes

Contents

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

32 entries across 32 versions & 1 rubygems

Version Path
flipper-1.3.2 spec/flipper/types/boolean_spec.rb
flipper-1.3.1 spec/flipper/types/boolean_spec.rb
flipper-1.3.0 spec/flipper/types/boolean_spec.rb
flipper-1.3.0.pre spec/flipper/types/boolean_spec.rb
flipper-1.2.2 spec/flipper/types/boolean_spec.rb
flipper-1.2.1 spec/flipper/types/boolean_spec.rb
flipper-1.2.0 spec/flipper/types/boolean_spec.rb
flipper-1.1.2 spec/flipper/types/boolean_spec.rb
flipper-1.1.1 spec/flipper/types/boolean_spec.rb
flipper-1.1.0 spec/flipper/types/boolean_spec.rb
flipper-1.0.0 spec/flipper/types/boolean_spec.rb
flipper-1.0.0.pre spec/flipper/types/boolean_spec.rb
flipper-0.28.3 spec/flipper/types/boolean_spec.rb
flipper-0.28.2 spec/flipper/types/boolean_spec.rb
flipper-0.28.1 spec/flipper/types/boolean_spec.rb
flipper-0.28.0 spec/flipper/types/boolean_spec.rb
flipper-0.27.1 spec/flipper/types/boolean_spec.rb
flipper-0.27.0 spec/flipper/types/boolean_spec.rb
flipper-0.26.2 spec/flipper/types/boolean_spec.rb
flipper-0.26.1 spec/flipper/types/boolean_spec.rb