From ff577405ae62affd4e670bc97f16ce89cb288dc0 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 9 Jun 2016 22:01:48 +0800 Subject: [PATCH] FIX: Randomly failing TopicList specs. --- spec/models/topic_list_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/models/topic_list_spec.rb b/spec/models/topic_list_spec.rb index ded7e9231a..3d57604d04 100644 --- a/spec/models/topic_list_spec.rb +++ b/spec/models/topic_list_spec.rb @@ -5,6 +5,10 @@ describe TopicList do let(:user) { topic.user } let(:topic_list) { TopicList.new("liked", user, [topic]) } + before do + TopicList.preloaded_custom_fields.clear + end + after do TopicList.preloaded_custom_fields.clear end