A platform for community discussion. Free, open, simple.
FIX: Make test less fragile.
Guo Xiang Tan38ded77e1608
diff --git a/spec/components/discourse_redis_spec.rb b/spec/components/discourse_redis_spec.rbindex a99c763414b..10ee9a7f6ed 100644--- a/spec/components/discourse_redis_spec.rb+++ b/spec/components/discourse_redis_spec.rb@@ -175,9 +175,12 @@ describe DiscourseRedis doendit "should raise the right error" do- error = RuntimeError.new('test error')- Redis::Client.any_instance.expects(:call).raises(error).twice- 2.times { expect { connector.resolve }.to raise_error(error) }+ error = RuntimeError.new('test')++ 2.times do+ expect { connector.resolve(BrokenRedis.new(error)) }+ .to raise_error(error)+ endendend