22 lines
706 B
Ruby
22 lines
706 B
Ruby
require File.dirname(__FILE__) + '/../test_helper'
|
|
require 'holidays/ups'
|
|
|
|
# This file is generated by the Ruby Holiday gem.
|
|
#
|
|
# Definitions loaded: data/ups.yaml
|
|
class UpsDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
|
|
def test_ups
|
|
{Date.civil(2008,1,1) => 'New Year\'s Day',
|
|
Date.civil(2008,5,26) => 'Memorial Day',
|
|
Date.civil(2008,7,4) => 'Independence Day',
|
|
Date.civil(2008,9,1) => 'Labor Day',
|
|
Date.civil(2008,11,27) => 'Thanksgiving',
|
|
Date.civil(2008,11,28) => 'Day After Thanksgiving',
|
|
Date.civil(2008,12,25) => 'Christmas Day',
|
|
Date.civil(2008,12,31) => 'New Year\'s Eve',}.each do |date, name|
|
|
assert_equal name, Holidays.on(date, :ups)[0][:name]
|
|
end
|
|
end
|
|
end
|