Redefine methods in module rather than class eval so that super can
be called. Doing so in class_eval was causing recursion (stack too
deep) errors when running specs.