Justin… I’ll add more than one ‘expect’ if they’re all part of a set, or a sequence of things that all occur essentially at once. Otherwise, I try to stick to the one it / one expect suggestion.
@Justin_Gordon The idea is not that you can only have one “expect” is that you should only assert one thing. That thing might only get assert by more than one expectation. Does that make sense?
I completely agree with the others, but I’ll just quickly add my two cents here. A quick way that I determine when expectations belong together is:
Since the test will stop running when it hits the first failing expectation, ask yourself: If the first expectation fails, do I care about the the outcome of the other expectations? If the answer is “no”, then they belong in the same block.