From e7e16de3e0a793eec903eba9926512ca76ec2959 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 7 Jul 2017 13:18:53 +0900 Subject: [PATCH] Remove use of stubs in specs. --- spec/models/top_menu_item_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/models/top_menu_item_spec.rb b/spec/models/top_menu_item_spec.rb index a92df985ffc..61f78e08490 100644 --- a/spec/models/top_menu_item_spec.rb +++ b/spec/models/top_menu_item_spec.rb @@ -1,7 +1,10 @@ require 'rails_helper' describe TopMenuItem do - before(:each) { SiteSetting.stubs(:top_menu).returns('one,-nope|two|three,-not|four,ignored|category/xyz') } + before do + SiteSetting.top_menu = 'one,-nope|two|three,-not|four,ignored|latest|category/xyz' + end + let(:items) { SiteSetting.top_menu_items } it 'has name' do