From 32e0c4997ca2ab2e80862d501fb8c051321fb8e1 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Tue, 30 Apr 2019 18:50:57 +0100 Subject: [PATCH] Prefabricated posts --- spec/components/topic_view_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/components/topic_view_spec.rb b/spec/components/topic_view_spec.rb index 57f38c2f1ae..736bf1ef581 100644 --- a/spec/components/topic_view_spec.rb +++ b/spec/components/topic_view_spec.rb @@ -100,9 +100,9 @@ describe TopicView do end context "with a few sample posts" do - let!(:p1) { Fabricate(:post, topic: topic, user: first_poster, percent_rank: 1) } - let!(:p2) { Fabricate(:post, topic: topic, user: evil_trout, percent_rank: 0.5) } - let!(:p3) { Fabricate(:post, topic: topic, user: first_poster, percent_rank: 0) } + fab!(:p1) { Fabricate(:post, topic: topic, user: first_poster, percent_rank: 1) } + fab!(:p2) { Fabricate(:post, topic: topic, user: evil_trout, percent_rank: 0.5) } + fab!(:p3) { Fabricate(:post, topic: topic, user: first_poster, percent_rank: 0) } it "it can find the best responses" do