Sha256: 6dbefd1e47d5b5b5ecd97afdfaca4b288f42d2ecea0335dbfcc2135822b2d3f3
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
Contents
require 'spec_helper' describe 'maybe' do subject(:maybe) { Unboolean::Maybe.new } its(:inspect) { should == 'maybe' } specify('#=> maybe') { expect(subject).to eql(maybe) } context '!' do specify('#=> maybe') { expect(!subject).to eql(maybe) } end context '==' do specify('true #=> maybe') { expect(subject == true).to eql(maybe) } specify('false #=> maybe') { expect(subject == false).to eql(maybe) } specify('maybe #=> maybe') { expect(subject == maybe).to eql(maybe) } end context '&' do specify('true #=> maybe') { expect(subject & true).to eql(maybe) } specify('false #=> false') { expect(subject & false).to eql(false) } specify('maybe #=> maybe') { expect(subject & maybe).to eql(maybe) } end context '|' do specify('true #=> true') { expect(subject | true).to eql(true) } specify('false #=> maybe') { expect(subject | false).to eql(maybe) } specify('maybe #=> maybe') { expect(subject | maybe).to eql(maybe) } end context '^' do specify('true #=> maybe') { expect(subject ^ true).to eql(maybe) } specify('false #=> maybe') { expect(subject ^ false).to eql(maybe) } specify('maybe #=> maybe') { expect(subject ^ maybe).to eql(maybe) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unboolean-0.0.2 | spec/unboolean/maybe_spec.rb |