One thing to keep in mind is that while you may view the code test as bad, it might not having malicious intent; some managers simply lack experience in putting together tests and fall back on old specs. There's two things I do during interviews prior to writing a single line of code:
1. Every code test I have taken has been brought up during a discussion. I use this opportunity to ask questions about the test. If you're interviewing with a recruiter who's not familiar with the test, they'll forward your questions to the manager who's evaluating the test for clarification. The manager's response will come either prior to accepting the assignment, or with the assignment attached to it.
2. Immediately upon receiving the code test, I review the spec in its entirety. If I have concerns with the spec, I raise those right away, as to not give the impression that I'm incapable of completing the spec if I bring up these concerns at a later time.