Sha256: 684cb58c9367afe718db9917c30fdc90fc6b2d92334ed8a6fa85454241bd7244

Contents?: true

Size: 506 Bytes

Versions: 5

Compression:

Stored size: 506 Bytes

Contents

describe Ppl::Format::Contact::Nicknames do

  before(:each) do
    @format  = Ppl::Format::Contact::Nicknames.new
    @contact = Ppl::Entity::Contact.new
  end

  describe "#process" do

    it "should return an empty string if the contact lacks a nickname" do
      @format.process(Ppl::Entity::Contact.new).should eq ""
    end

    it "should return the contact's nickname if one is set" do
      @contact.nicknames.push("Dopey")
      @format.process(@contact).should eq "Dopey"
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ppl-1.14.1 spec/ppl/format/contact/nicknames_spec.rb
ppl-1.14.0 spec/ppl/format/contact/nicknames_spec.rb
ppl-1.13.0 spec/ppl/format/contact/nicknames_spec.rb
ppl-1.12.0 spec/ppl/format/contact/nicknames_spec.rb
ppl-1.11.0 spec/ppl/format/contact/nicknames_spec.rb