Sha256: 11ae840f3077f41f87b336bc86defb978b4f13e25d4af91bcfbe47bb30c3b620
Contents?: true
Size: 838 Bytes
Versions: 18
Compression:
Stored size: 838 Bytes
Contents
describe Ppl::Format::AddressBook::Names do before(:each) do @format = Ppl::Format::AddressBook::Names.new @address_book = Ppl::Entity::AddressBook.new @contact = Ppl::Entity::Contact.new @table = double(Ppl::Format::Table) @contact.id = "test" @format.table = @table @address_book.add_contact(@contact) end describe "#process" do it "should at least show the contact's id" do @table.should_receive(:add_row).with({ :id => "test:", :name => nil, }) @format.process(@address_book) end it "should show the name if it's available" do @contact.name = "John Doe" @table.should_receive(:add_row).with({ :id => "test:", :name => "John Doe", }) @format.process(@address_book) end end end
Version data entries
18 entries across 18 versions & 1 rubygems