Sha256: 2bbfe67d70341b76fb6ddade7c00ec76d0b48bb1db453b88c7441e0f88d7b006

Contents?: true

Size: 689 Bytes

Versions: 9

Compression:

Stored size: 689 Bytes

Contents

describe Ppl::Format::AddressBook::MuttQuery do

  before(:each) do
    @format       = Ppl::Format::AddressBook::MuttQuery.new
    @address_book = Ppl::Entity::AddressBook.new
    @contact      = Ppl::Entity::Contact.new
    @table        = double(Ppl::Format::Table)

    @contact.email_addresses.push "test@example.org"
    @contact.name = "Test Contact"

    @format.table = @table
    @address_book.contacts.push(@contact)
  end

  describe "#process" do

    it "should list the given contacts" do
      @table.should_receive(:add_row).with({
        :email => "test@example.org",
        :name  => "Test Contact",
      })
      @format.process(@address_book)
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ppl-1.15.1 spec/ppl/format/address_book/mutt_query_spec.rb
ppl-1.15.0 spec/ppl/format/address_book/mutt_query_spec.rb
ppl-1.14.1 spec/ppl/format/address_book/mutt_query_spec.rb
ppl-1.14.0 spec/ppl/format/address_book/mutt_query_spec.rb
ppl-1.13.0 spec/ppl/format/address_book/mutt_query_spec.rb
ppl-1.12.0 spec/ppl/format/address_book/mutt_query_spec.rb
ppl-1.11.0 spec/ppl/format/address_book/mutt_query_spec.rb
ppl-1.10.0 spec/ppl/format/address_book/mutt_query_spec.rb
ppl-1.9.0 spec/ppl/format/address_book/mutt_query_spec.rb