mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Make test less fragile.
This commit is contained in:
@@ -175,9 +175,12 @@ describe DiscourseRedis do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "should raise the right error" do
|
it "should raise the right error" do
|
||||||
error = RuntimeError.new('test error')
|
error = RuntimeError.new('test')
|
||||||
Redis::Client.any_instance.expects(:call).raises(error).twice
|
|
||||||
2.times { expect { connector.resolve }.to raise_error(error) }
|
2.times do
|
||||||
|
expect { connector.resolve(BrokenRedis.new(error)) }
|
||||||
|
.to raise_error(error)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user