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