fix undefined method in spec helper