lib/adapter/spec/an_adapter.rb in adapter-0.6.2 vs lib/adapter/spec/an_adapter.rb in adapter-0.6.3

- old
+ new

@@ -4,10 +4,12 @@ end let(:key) { 'key' } let(:key2) { 'key2' } + let(:unavailable_key) { 'foo' } + let(:attributes) { { 'one' => 'one', 'three' => 'three', } @@ -80,22 +82,21 @@ end end context "with mix of keys that are and are not available" do it "returns Hash of keys and attributes where unavailable keys are nil" do - result = adapter.read_multiple(key, key2, 'foo', 'bar') + result = adapter.read_multiple(key, key2, unavailable_key) attributes.each do |column, value| result[key][column].should eq(value) end attributes2.each do |column, value| result[key2][column].should eq(value) end - result['foo'].should be_nil - result['bar'].should be_nil + result[unavailable_key].should be_nil end end end describe "#get_multiple" do @@ -116,21 +117,20 @@ end end context "with mix of keys that are and are not available" do it "returns Hash of keys and attributes where unavailable keys are nil" do - result = adapter.get_multiple(key, key2, 'foo', 'bar') + result = adapter.get_multiple(key, key2, unavailable_key) attributes.each do |column, value| result[key][column].should eq(value) end attributes2.each do |column, value| result[key2][column].should eq(value) end - result['foo'].should be_nil - result['bar'].should be_nil + result[unavailable_key].should be_nil end end end describe "#key?" do