spec/lib/cachew/adapters_spec.rb in cachew-0.1.0 vs spec/lib/cachew/adapters_spec.rb in cachew-0.1.1

- old
+ new

@@ -14,9 +14,16 @@ adapter = Cachew::Adapters::HashAdapter.new :foo => :bar expect(described_class.build_adapter_for adapter).to be adapter end end + context "with instance of Cachew" do + it "returns original #adapter" do + original = Cachew.new :foo => :bar + expect(Cachew.new(original).adapter).to be original.adapter + end + end + it "returns NullAdapter if can't find better candidate" do expect(described_class.build_adapter_for "test") .to be_a Cachew::Adapters::NullAdapter end end