RSpec claims nil to be false

RSpec's be_false behaves unexpectedly:

nil.should be_false
# passes, as the expectation returns true

If you want to check for false, you need to do it like this:

nil.should == false
# fails as expected

Wat? Show archive.org snapshot

See also

RSpec: be_true does not actually check if a value is true

Arne Hartherz Almost 12 years ago