Sha256: 9d41a014fca5d70635a9116b1bc93d6194f29c9100e0f0aafa57d7af51990931

Contents?: true

Size: 830 Bytes

Versions: 5

Compression:

Stored size: 830 Bytes

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::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

5 entries across 5 versions & 1 rubygems

Version Path
rubyredrick-ri_cal-0.0.3 spec/ri_cal/property_value/date_spec.rb
rubyredrick-ri_cal-0.0.4 spec/ri_cal/property_value/date_spec.rb
rubyredrick-ri_cal-0.0.5 spec/ri_cal/property_value/date_spec.rb
rubyredrick-ri_cal-0.0.6 spec/ri_cal/property_value/date_spec.rb
rubyredrick-ri_cal-0.0.7 spec/ri_cal/property_value/date_spec.rb