Sha256: 7b2e37867a2d8087f535920c00df65f55b84005918d035dbbf5f43252fb8f30c

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

require 'spec_helper'

describe false do
  subject { false }

  specify('#=> false') { expect(subject).to eql(false) }

  context '!' do
    specify('#=> true') { expect(!subject).to eql(true) }
  end

  context '==' do
    specify('true #=> false') { expect(subject == true).to eql(false) }
    specify('false #=> true') { expect(subject == false).to eql(true) }
    specify('maybe #=> maybe') { expect(subject == maybe).to eql(maybe) }
  end

  context '&' do
    specify('true #=> false') { expect(subject & true).to eql(false) }
    specify('false #=> false') { expect(subject & false).to eql(false) }
    specify('maybe #=> false') { expect(subject & maybe).to eql(false) }
  end

  context '|' do
    specify('true #=> true') { expect(subject | true).to eql(true) }
    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 #=> false') { expect(subject ^ false).to eql(false) }
    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/core_ext/false_class_spec.rb