From 5cac7a874b841c33f713ff2b6e476d68b1f1027b Mon Sep 17 00:00:00 2001 From: Chris Blanchard Date: Fri, 18 Sep 2015 14:42:57 +0100 Subject: [PATCH] Fix topic spec --- spec/models/topic_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb index 592de27..437c409 100644 --- a/spec/models/topic_spec.rb +++ b/spec/models/topic_spec.rb @@ -32,9 +32,8 @@ describe Topic do it "returns 5 unique, most recently posted topics" do topics = [] 10.times do - topic = create :topic - topics << topic - 3.times { create :post, topic: topic } + topic = create :topic, first_post: "Foo" + topics.push(topic) end recent_topics = Topic.recent_topics topics.last(5).each do |topic|