Sha256: 7a06b3548c24f1ca7e665d0ae6998f8772e5d0215b04bfc90fedf266d306e4b9
Contents?: true
Size: 848 Bytes
Versions: 27
Compression:
Stored size: 848 Bytes
Contents
describe Ppl::Format::Contact::Birthday do before(:each) do @format = Ppl::Format::Contact::Birthday.new @contact = Ppl::Entity::Contact.new @color = double(Ppl::Adapter::Color) @format.color_adapter = @color 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 it "should colorize the string if configured to do so" do @format.colors = { "birthday" => "blue" } @color.should_receive(:colorize).and_return("birthday in blue") @format.process(@contact).should eq "birthday in blue" end end end
Version data entries
27 entries across 27 versions & 1 rubygems