get rid of deprecation warning.

@penguincoder - I've been seeing this warning in our tests, and I just want to clean it up. My only question is the context of "self" in the class_eval. Will that work here?