Move support methods out of spec_helper