Factor out some spec duplication