Sha256: a7e2a4116ef3f3e14efad5c3d4c8373b2bd3aed43bad4ca0cc0f7d38553ddeeb

Contents?: true

Size: 520 Bytes

Versions: 25

Compression:

Stored size: 520 Bytes

Contents

describe Ppl::Format::Contact::Birthday do

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

  describe "#process" do

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

    it "should return the contact's birthday if it is set" do
      @contact.birthday = Date.parse("1970-01-01")
      @format.process(@contact).should eq "1970-01-01"
    end

  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
ppl-1.0.4 spec/ppl/format/contact/birthday_spec.rb
ppl-1.0.3 spec/ppl/format/contact/birthday_spec.rb
ppl-1.0.1 spec/ppl/format/contact/birthday_spec.rb
ppl-1.0.0 spec/ppl/format/contact/birthday_spec.rb
ppl-0.9.0 spec/ppl/format/contact/birthday_spec.rb