add factories spec, closes #120