From 9161721708297cc0017bd9ad2d490867e9bf9f29 Mon Sep 17 00:00:00 2001 From: Brent Miller Date: Sat, 10 Dec 2011 12:35:56 -0800 Subject: [PATCH] Fix for extra colon at beginning of x-properties when written to string --- lib/ri_cal/component.rb | 2 +- spec/ri_cal/component_spec.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ri_cal/component.rb b/lib/ri_cal/component.rb index 7aeac097..7350d180 100644 --- a/lib/ri_cal/component.rb +++ b/lib/ri_cal/component.rb @@ -214,7 +214,7 @@ def export_prop_to(export_stream, name, prop) #:nodoc: def export_x_properties_to(export_stream) #:nodoc: x_properties.each do |name, props| props.each do | prop | - export_stream.puts("#{name}:#{prop}") + export_stream.puts("#{name}#{prop}") end end end diff --git a/spec/ri_cal/component_spec.rb b/spec/ri_cal/component_spec.rb index 93fe2b93..b0281964 100644 --- a/spec/ri_cal/component_spec.rb +++ b/spec/ri_cal/component_spec.rb @@ -190,6 +190,10 @@ it 'should have an x_wr_calname property with the value "My Personal Calendar"' do @it.x_wr_calname.first.should == "My Personal Calendar" end + + it 'should write out the x_wr_calname with the value "My Personal Calendar"' do + @it.to_s.should =~ /X-WR-CALNAME:My Personal Calendar/ + end context "event with a long description and a dsl built recurence rule" do before(:each) do