title: Rspec: nil.should_not be_nil passes when I expect failure. Why?
body: <p>Doing some rspec work in a Rails project. Kind curious why these should_not be_nil expectations pass. Any thoughts?    </p>
  
  <pre><code>it "nils should be nil" do
    @io = nil
    @io.should_not be_nil #passes (shouldn't!!)
    nil.should_not be_nil #passes (shouldn't!!)
    @io.should == nil # passes
    @io.should be_nil # passes
    @io.nil?.should be_true # passes
    #@io.nil?.should be_false # fails as expected
  end
  </code></pre>
  
  <p><strong>UPDATE:</strong> Based on feedback here I've been able isolate the cause of this (which is from things loaded in the <code>spec_helper</code>). I believe it's due to a poor swizzling of <code>.nil?</code>  or <code>.blank?</code> which I'm going to have a talk to the dev to see if these overrides are really necessary at all.</p>
  
  <p>Thanks to those who helped verify my stuff.</p>