Sha256: 223ae9cca044346fb78700bcd0523876a9133889e26ec165268a6af1e385c669

Contents?: true

Size: 1.2 KB

Versions: 51

Compression:

Stored size: 1.2 KB

Contents

#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license

require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])

describe RiCal::Component::Journal do
  
  describe ".entity_name" do
    it "should be VJOURNAL" do
      RiCal::Component::Journal.entity_name.should == "VJOURNAL"
    end
  end
  
  context ".start_time" do
    it "should be the same as dtstart for a date time" do
      event = RiCal.Journal {|e| e.dtstart = "20090525T151900"}
      event.start_time.should == DateTime.civil(2009,05,25,15,19,0,0)
    end
    
    it "should be the start of the day of dtstart for a date" do
      event = RiCal.Journal {|e| e.dtstart = "20090525"}
      event.start_time.should == DateTime.civil(2009,05,25,0,0,0,0)
    end
  end
  
  context ".finish_time" do
    it "should be the same as dtstart for a date time" do
      event = RiCal.Journal {|e| e.dtstart = "20090525T151900"}
      event.finish_time.should == DateTime.civil(2009,05,25,15,19,0,0)
    end
    
    it "should be the start of the day of dtstart for a date" do
      event = RiCal.Journal {|e| e.dtstart = "20090525"}
      event.finish_time.should == DateTime.civil(2009,05,25,0,0,0,0)
    end
  end
  
end

Version data entries

51 entries across 51 versions & 8 rubygems

Version Path
demingfactor-ri_cal-0.10.0 spec/ri_cal/component/journal_spec.rb
demingfactor-ri_cal-0.9.0 spec/ri_cal/component/journal_spec.rb
ebeigarts-ri_cal-0.8.1 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.5.0 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.5.1 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.5.2 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.5.3 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.6.0 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.6.1 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.6.2 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.6.3 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.7.0 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.7.1 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.7.2 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.7.4 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.7.5 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.7.7 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.8.0 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.8.1 spec/ri_cal/component/journal_spec.rb
rubyredrick-ri_cal-0.8.2 spec/ri_cal/component/journal_spec.rb