aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/nil/xor_spec.rb
blob: 7f2131e79593869e87c3c52776df6dfecdca0e0a (plain)
1
2
3
4
5
6
7
8
9
10
11
require File.expand_path('../../../spec_helper', __FILE__)

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