Move tests under spec. Add resources factory #7