From c39299479347820a36607e1b5784b5bf6d113541 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 3 Feb 2017 08:38:19 +0800 Subject: [PATCH] Fix specs. --- spec/models/global_setting_spec.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/models/global_setting_spec.rb b/spec/models/global_setting_spec.rb index 20f53b8598a..7be0db648fd 100644 --- a/spec/models/global_setting_spec.rb +++ b/spec/models/global_setting_spec.rb @@ -10,8 +10,15 @@ describe GlobalSetting do end describe 'when slave config is present' do - it "should set the right connector" do + before do GlobalSetting.reset_redis_config! + end + + after do + GlobalSetting.reset_redis_config! + end + + it "should set the right connector" do GlobalSetting.expects(:redis_slave_port).returns(6379).at_least_once GlobalSetting.expects(:redis_slave_host).returns('0.0.0.0').at_least_once