Fixed failing tests.
This commit is contained in:
parent
91f7a5eb76
commit
218a7362dc
@ -6,10 +6,11 @@ describe CacheStoreDatabase do
|
|||||||
describe "self.use" do
|
describe "self.use" do
|
||||||
let(:type) { :test }
|
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)
|
cache_store = double("cache_store", close_if_open!: nil)
|
||||||
expect(CacheStoreDatabase).to receive(:new).with(type).and_return(cache_store)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -41,7 +42,7 @@ describe CacheStoreDatabase do
|
|||||||
|
|
||||||
it "gets value in the `CacheStoreDatabase` corresponding to the key" do
|
it "gets value in the `CacheStoreDatabase` corresponding to the key" do
|
||||||
expect(db).to have_key(:foo)
|
expect(db).to have_key(:foo)
|
||||||
expect(subject.get(:foo)).to equal("bar")
|
expect(subject.get(:foo)).to eq("bar")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
require "test/support/fixtures/testball"
|
|
||||||
require "linkage_cache_store"
|
require "linkage_cache_store"
|
||||||
|
|
||||||
describe LinkageCacheStore do
|
describe LinkageCacheStore do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user