Instead of this you could have used :

comment_2 = FactoryGirl.create(:comment, link:@link)

which would have created another comment that is associated with the existing link, eliminating the need for:

@link.comments << comment2

@link.save

on lines 48 and 50 below.