spec/ppl/command/mutt_spec.rb in ppl-1.8.0 vs spec/ppl/command/mutt_spec.rb in ppl-1.9.0
- old
+ new
@@ -25,20 +25,20 @@
expect{@command.execute(@input, @output)}.to raise_error(Ppl::Error::IncorrectUsage)
end
it "should search the address book for the query" do
@input.arguments.push "query"
- @command.should_receive(:mutt_search).and_return([])
+ @command.should_receive(:mutt_search).and_return(Ppl::Entity::AddressBook.new)
@output.should_receive(:line).with("No matches")
@command.execute(@input, @output).should eq false
end
it "should return email address matches" do
@contact.name = "Test User"
@contact.email_addresses.push "test@example.org"
- @address_book.add_contact(@contact)
+ @address_book.contacts.push(@contact)
@input.arguments.push "example"
@storage.should_receive(:load_address_book).and_return(@address_book)
@output.should_receive(:line) do |line|
@@ -50,10 +50,10 @@
it "should return name matches" do
@contact.name = "Test User"
@contact.email_addresses.push "test@example.org"
- @address_book.add_contact(@contact)
+ @address_book.contacts.push(@contact)
@input.arguments.push "User"
@storage.should_receive(:load_address_book).and_return(@address_book)
@output.should_receive(:line) do |line|