Skip to content

Commit

Permalink
Merge pull request #15 from HouseTrip/rspec-be_false-warning
Browse files Browse the repository at this point in the history
Add warning about be_false being falsey in rspec 1.3
  • Loading branch information
dncrht committed Jul 23, 2014
2 parents 7d9e674 + bd1a554 commit 0863564
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rspec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0863564

Please sign in to comment.