The intent of the test would probably be clearer here if you just used fail() with the same message