edited so that slug and rendered test are stored in @attributes