Sha256: f21441a87d6370dcb122347366113f150e0954c120ee35f430cb40804a113956

Contents?: true

Size: 1.05 KB

Versions: 4

Compression:

Stored size: 1.05 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe Sculd::Plan::Reminder do # E.g., Klass
  context 'Date[2012-10-23], 10, [2012-10-23]- reminderA' do

    before do
      date = Date.new(2012, 10, 23)
      @r00 = Sculd::Plan::Reminder.new(date, 10, '[2012-10-23]- reminderA')
    end

    describe '#priority' do # ''
      context '' do
        it 'return REMINDER_PRIORITY when the day is today .' do
          date = Date.new(2012, 10, 23)
          @r00.priority(date).should == 10000
        end

        it 'return REMINDER_PRIORITY -1 when the day is yesterday .' do
          date = Date.new(2012, 10, 24)
          @r00.priority(date).should == 9999
        end
      end
    end

    describe '#events' do # ''
      context '' do
        it 'return a Sculd::Event instance.' do
          result = @r00.events
          result.class.should == Array
          result.size.should == 1
          result[0].class.should == Sculd::Event
          result[0].datetime.to_date.should == Date.new(2012, 10, 23)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sculd-0.0.3 spec/reminder_spec.rb
sculd-0.0.2 spec/reminder_spec.rb
sculd-0.0.1 spec/reminder_spec.rb
sculd-0.0.0 spec/reminder_spec.rb