fix tests when GEM_SPEC is set in environment