Created
August 1, 2011 08:57
-
-
Save hannakalinowska/1117827 to your computer and use it in GitHub Desktop.
Love RSpec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User | |
| has_many :jobs | |
| end | |
| it 'has a job' do | |
| user.should have(1).job | |
| end |
Author
Could do. I just love the fact that you can do
user.should have(1).job
rather than
user.jobs.should have(1).item
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can even drop the redundant description in this case: