Sha256: fbce95981dd2d49cd43f9d77dd23c499d1d448903161502ec67810e64255eb61
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
require 'test_helper' module Vedeu describe Boolean do let(:described) { Vedeu::Boolean } let(:instance) { described.new(_value) } let(:_value) {} describe '#initialize' do it { instance.must_be_instance_of(Vedeu::Boolean) } end describe '#false?' do subject { instance.false? } context 'when the value is nil' do it { subject.must_equal(true) } end context 'when the value is false' do let(:_value) { false } it { subject.must_equal(true) } end context 'when the value is anything else' do let(:_value) { :anything } it { subject.must_equal(false) } end end describe '#true?' do subject { instance.true? } context 'when the value is nil' do it { subject.must_equal(false) } end context 'when the value is true' do let(:_value) { true } it { subject.must_equal(true) } end context 'when the value is anything else' do let(:_value) { :anything } it { subject.must_equal(true) } end end end # Boolean end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.8.0 | test/lib/vedeu/boolean_test.rb |