Posted almost 10 years ago. Visible to the public.
RSpec claims nil to be false
RSpec's be_false
behaves unexpectedly:
Copynil.should be_false # passes, as the expectation returns true
If you want to check for false
, you need to do it like this:
Copynil.should == false # fails as expected
See also
RSpec: be_true does not actually check if a value is true
makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.