From bd1a55469887192523ae1ef96888a8aac9a3df51 Mon Sep 17 00:00:00 2001 From: Kris Leech Date: Tue, 22 Jul 2014 10:50:49 +0100 Subject: [PATCH] Add warning about be_false being falsey in rspec 1.3 --- rspec.md | 1 + 1 file changed, 1 insertion(+) diff --git a/rspec.md b/rspec.md index 7d88c39..86fae0f 100644 --- a/rspec.md +++ b/rspec.md @@ -59,6 +59,7 @@ it { subject.published? eql(true) } # good it { subject be_published } ``` +*Rspec 1.3 only*: For methods which return a boolean, e.g. `active?`, use `eq false` not `be_false`, since `be_false` will allowed `nil` as well as `false` and is the same as `be_falsey` in rspec 3. - When testing size of an array or array-like object (e.g.: an ActiveRecord relation) use the `have` matcher. RSpec will send the trailing method and `size` to the object for you