test tidy. remove dead code and fix require spec_helper