Sha256: f1a6b8302e138fcbbb63fa4f617784190e2ef5b11a5ba151f97dde5478e6e1da

Contents?: true

Size: 575 Bytes

Versions: 5

Compression:

Stored size: 575 Bytes

Contents

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

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

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

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flipper-0.7.1 spec/flipper/types/boolean_spec.rb
flipper-0.7.0 spec/flipper/types/boolean_spec.rb
flipper-0.7.0.beta6 spec/flipper/types/boolean_spec.rb
flipper-0.7.0.beta5 spec/flipper/types/boolean_spec.rb
flipper-0.7.0.beta4 spec/flipper/types/boolean_spec.rb