Sha256: b52e4f8b10302e1e0187f3631acc3889c4543bbd96b6b9bdfe3465c69c0b72ea
Contents?: true
Size: 1.52 KB
Versions: 30
Compression:
Stored size: 1.52 KB
Contents
describe Ppl::Adapter::Storage do before(:each) do @storage = Ppl::Adapter::Storage.new end describe "#create_address_book" do it "should raise not implemented error" do expect{Ppl::Adapter::Storage.create_address_book(nil)}.to raise_error(NotImplementedError) end end describe "#delete_contact" do it "should raise not implemented error" do expect{@storage.delete_contact(nil)}.to raise_error(NotImplementedError) end end describe "#load_address_book" do it "should raise not implemented error" do expect{@storage.load_address_book}.to raise_error(NotImplementedError) end end describe "#load_contact" do it "should raise not implemented error" do expect{@storage.load_contact(nil)}.to raise_error(NotImplementedError) end end describe "#require_contact" do it "should raise Ppl::Error::ContactNotFound if load fails" do @storage.stub(:load_contact) do |id| end expect{@storage.require_contact("joe")}.to raise_error(Ppl::Error::ContactNotFound) end it "should return the loaded contact" do @storage.stub(:load_contact) do |id| Object.new end @storage.require_contact("joe").should be_an(Object) end end describe "#save_contact" do it "should raise not implemented error" do expect{@storage.save_contact(nil)}.to raise_error(NotImplementedError) end end describe "#path" do it "should raise not implemented error" do expect{@storage.path}.to raise_error(NotImplementedError) end end end
Version data entries
30 entries across 30 versions & 1 rubygems