clean code: refactor specs with transient attributes