# frozen_string_literal: true require "spec_helpers" describe Wayfarer::Redis::Pool, redis: true do let(:conn) { spy } subject(:pool) { Wayfarer::Redis::Pool.send(:new) } describe "::with" do before do Wayfarer.config.redis.factory = ->(_) { conn } end it "instantiates the factory and yields" do pool.with { |x| expect(x).to be(conn) } end end end