Sha256: e3f2c668250e7119e3598a0924989a371180ded5f13fc394f138df3119a5382e

Contents?: true

Size: 786 Bytes

Versions: 1

Compression:

Stored size: 786 Bytes

Contents

#- ©2009 Rick DeNatale
#- All rights reserved

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

describe RiCal::PropertyValue::Date do
  describe ".advance" do
    it "should advance by one week if passed :days => 7" do
      dt1 = RiCal::PropertyValue::Date.new(nil, :value => "20050131")
      dt2 = RiCal::PropertyValue::Date.new(nil, :value => "20050207")
      dt1.advance(:days => 7).should == dt2
    end
    
    describe ".==" do
      it "should return true for two instances representing the same date" do
        dt1 = RiCal::PropertyValue::Date.new(nil, :value => DateTime.parse("20050131T010000"))
        dt2 = RiCal::PropertyValue::Date.new(nil, :value => DateTime.parse("20050131T010001"))
        dt1.should == dt2        
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyredrick-ri_cal-0.0.2 spec/ri_cal/property_value/date_spec.rb