Sha256: d34ae61fc56579f2b3bc8f0540c09163f6232eb7b74c220c8fbcdaa996b19990

Contents?: true

Size: 498 Bytes

Versions: 14

Compression:

Stored size: 498 Bytes

Contents

describe "Boolean#&" do
  it "when false returns false" do
    (false & true).should == false
    (false & false).should == false
    (false & nil).should == false
    (false & "").should == false
    (false & mock('x')).should == false
  end

  it "when true returns false if other is nil or false, otherwise true" do
    (true & true).should == true
    (true & false).should == false
    (true & nil).should == false
    (true & "").should == true
    (true & mock('x')).should == true
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
opal-0.3.41 spec/core/boolean/and_spec.rb
opal-0.3.40 spec/core/boolean/and_spec.rb
opal-0.3.39 spec/core/boolean/and_spec.rb
opal-0.3.38 spec/core/boolean/and_spec.rb
opal-0.3.37 spec/core/boolean/and_spec.rb
opal-0.3.36 spec/core/boolean/and_spec.rb
opal-0.3.35 spec/core/boolean/and_spec.rb
opal-0.3.34 spec/core/boolean/and_spec.rb
opal-0.3.33 spec/core/boolean/and_spec.rb
opal-0.3.32 spec/core/boolean/and_spec.rb
opal-0.3.31 spec/core/boolean/and_spec.rb
opal-0.3.30 spec/core/boolean/and_spec.rb
opal-0.3.29 spec/core/boolean/and_spec.rb
opal-0.3.28 spec/core/boolean/and_spec.rb