summaryrefslogtreecommitdiff
path: root/spec/ruby/core/false/xor_spec.rb
blob: 3e5c452f9b0c487c2a3f9fa05893d3cd2ade8e44 (plain)
1
2
3
4
5
6
7
8
9
10
11
require File.expand_path('../../../spec_helper', __FILE__)

describe "FalseClass#^" do
  it "returns false if other is nil or false, otherwise true" do
    (false ^ false).should == false
    (false ^ true).should == true
    (false ^ nil).should == false
    (false ^ "").should == true
    (false ^ mock('x')).should == true
  end
end