Add TDD-style functions for attribute assertion.

Also, improve a spec helper to print the source code of the failing spec.