[rspec-users] there should be one test or two?

Myron Marston myron.marston at gmail.com
Fri Aug 27 19:59:24 EDT 2010


> One assertion per test [1] is a good rule of thumb, but don't get too hung up about it.

To rephrase this slightly, you should test one behavior per spec, and
having multiple assertions or expectations in the same test is a good
sign that you may be testing multiple behaviors.


More information about the rspec-users mailing list