Sha256: e41bd12301c2c7fe64533fc6015a6925eb67ffcaa97f421323dc8593ae6122db
Contents?: true
Size: 642 Bytes
Versions: 1
Compression:
Stored size: 642 Bytes
Contents
require 'spec_helper' describe DateTime do let(:date_time) { DateTime.parse("2010-01-01") } it "should allow advancing by calendar days" do expect(date_time.advance_considering_calendar(:calendar_days, 10)) .to eq DateTime.parse("2010-01-10 23:59:59") end it "should allow advancing by calendar months" do expect(date_time.advance_considering_calendar(:calendar_months, 10)) .to eq DateTime.parse("2010-10-31 23:59:59") end it "should allow advancing by calendar years" do expect(date_time.advance_considering_calendar(:calendar_years, 10)) .to eq DateTime.parse("2019-12-31 23:59:59") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
timely-0.1.0 | spec/rails/date_time_spec.rb |