Sha256: 2022d163d610e6a7b55781d19488af11254f0f656757e63a7511ad2a69380b95
Contents?: true
Size: 541 Bytes
Versions: 3
Compression:
Stored size: 541 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe WannabeBool::Integer do context Integer do describe '#to_b' do context 'when value is 0' do subject { 0 } it { expect(subject.to_b).to eq false } end context 'when value is 1' do subject { 1 } it { expect(subject.to_b).to eq true } end (2..9).each do |value| context "when value is #{value}" do subject { value } it { expect(subject.to_b).to eq false } end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wannabe_bool-0.0.3 | spec/wannabe_bool/integer_spec.rb |
wannabe_bool-0.0.2 | spec/wannabe_bool/integer_spec.rb |
wannabe_bool-0.0.1 | spec/wannabe_bool/integer_spec.rb |