Fixed failing tests.

This commit is contained in:
Andrew R. McBurney 2018-05-22 15:31:58 -04:00
parent 91f7a5eb76
commit 218a7362dc
2 changed files with 4 additions and 4 deletions

View File

@ -6,10 +6,11 @@ describe CacheStoreDatabase do
describe "self.use" do
let(:type) { :test }
it "creates a new `DatabaseCache` instance and yields it" do
it "creates a new `DatabaseCache` instance" do
cache_store = double("cache_store", close_if_open!: nil)
expect(CacheStoreDatabase).to receive(:new).with(type).and_return(cache_store)
expect(CacheStoreDatabase).to receive(:call).with(cache_store)
expect(cache_store).to receive(:close_if_open!)
CacheStoreDatabase.use(type) { |_db| }
end
end
@ -41,7 +42,7 @@ describe CacheStoreDatabase do
it "gets value in the `CacheStoreDatabase` corresponding to the key" do
expect(db).to have_key(:foo)
expect(subject.get(:foo)).to equal("bar")
expect(subject.get(:foo)).to eq("bar")
end
end

View File

@ -1,4 +1,3 @@
require "test/support/fixtures/testball"
require "linkage_cache_store"
describe LinkageCacheStore do