factor out a generic in mem repo spec