Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ri_cal/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion ri_cal.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Rick DeNatale"]
s.date = %q{2011-02-13}
s.default_executable = %q{ri_cal}
s.description = %q{A new Ruby implementation of RFC2445 iCalendar.

The existing Ruby iCalendar libraries (e.g. icalendar, vpim) provide for parsing and generating icalendar files,
Expand Down
25 changes: 18 additions & 7 deletions spec/ri_cal/bugreports_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
end
end

context "ticket #23" do
describe "ticket #23" do
describe "RecurrenceRule" do
it "should convert the rrule string to a hash" do
rrule = RiCal::PropertyValue::RecurrenceRule.convert(nil, 'INTERVAL=2;FREQ=WEEKLY;BYDAY=TH,TU')
Expand All @@ -238,16 +238,16 @@
end
end

context "ticket #26" do
context "Date property" do
describe "ticket #26" do
describe "Date property" do
it "should handle for_parent" do
lambda {
RiCal::PropertyValue::Date.convert(:foo, Date.parse("20090927")).for_parent(:bar)}.should_not raise_error
end
end
end

context "ticket 29:supress-x-rical-tzsource-when-not-relevant" do
describe "ticket 29:supress-x-rical-tzsource-when-not-relevant" do
it "should parse its own output" do
cal_string = %Q(BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
Expand All @@ -260,7 +260,7 @@
end
end

context "X-properties" do
describe "X-properties" do
it "should round-trip the X-WR-CALNAME property" do
cal_string = %Q(BEGIN:VCALENDAR
PRODID:-//Markthisdate.com\,0.7
Expand All @@ -272,5 +272,16 @@
cal = RiCal.parse_string(cal_string).first
cal.x_wr_calname.first.should == " AFC Ajax Eredivisie wedstrijden 2010 - 2011"
end
end


it "should define x-properties correctly" do
calendar = RiCal.Calendar
calendar.add_x_property 'x_wr_calname', 'Lifetracker'
calendar.export.should == %Q(BEGIN:VCALENDAR
PRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN
CALSCALE:GREGORIAN
VERSION:2.0
X-WR-CALNAME:Lifetracker
END:VCALENDAR
)
end
end