my result = runMyGreatTestCommandHere
puts "Test PASSED. We wanted to make sure it errored properly"
puts "Test FAILED. Expected to error."
On the surface, it's not so bad. It runs a test that should produce an error, and makes sure an error is produced. Let's dig one step deeper.
We're testing a failure mode, which means we're expecting not just any error, but an error we induced. For example, let's say we're testing login with a bad password, and want to see that there's an error "incorrect password". However, this test would pass if any other error occurred. If the page never loaded, or returned a stack trace instead of a login page, this test would pass just fine. After all, it got an error!
When you're testing failure modes, make sure not only that you get an error, but that you get the error you meant to get.