Sha256: 7c3b231fe54a38345e1eb461a7e5e40bd9851fe842b1400cf2475c7ac760abe0
Contents?: true
Size: 1.29 KB
Versions: 4
Compression:
Stored size: 1.29 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Sculd::Plan::Deadline do # E.g., Klass context 'Date[2012-10-15], 10, [2012-10-15]!10 deadlineA' do before do today = Date.new(2012, 10, 15) @d00 = Sculd::Plan::Deadline.new(today, 10, '[2012-10-15]!10 deadlineA') end describe '#priority' do # '' context '' do it 'return DEADLINE_PRIORITY when the day is today.' do today = Date.new(2012, 10, 15) @d00.priority(today).should == 20000 end it 'return DEADLINE_PRIORITY when the day is past.' do today = Date.new(2012, 10, 20) @d00.priority(today).should == 20000 end it 'return values between REMINDER_PRIORITY and DEADLINE_PRIORITY during the period.' do today = Date.new(2012, 10, 10) @d00.priority(today).should == 15000 end it 'return 0 before the period.' do today = Date.new(2012, 10, 1) @d00.priority(today).should == 0 end end end describe "#events" do context '' do it '' do @d00.events.size.should == 2 @d00.events[0].date.should == Date.new(2012, 10, 5) @d00.events[1].date.should == Date.new(2012, 10, 15) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sculd-0.0.3 | spec/deadline_spec.rb |
sculd-0.0.2 | spec/deadline_spec.rb |
sculd-0.0.1 | spec/deadline_spec.rb |
sculd-0.0.0 | spec/deadline_spec.rb |