Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
graywh
on Oct 3, 2012
|
parent
|
context
|
favorite
| on:
RSpec Best Practices
Then write
collection.length.should eq(2)
But I see nothing wrong with the other once you know how the "have" matcher works. It will even let you write
it { should have(2).items }
when your subject is set up properly.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: