Moved some code out of Request into the spec helper