holidays/test/defs/test_defs_us.rb

24 lines
826 B
Ruby
Raw Normal View History

2007-12-19 23:25:56 +01:00
require File.dirname(__FILE__) + '/../test_helper'
require 'holidays/us'
# This file is generated by the Ruby Holiday gem.
#
2008-01-15 05:29:21 +01:00
# Definitions loaded: data/us.yaml, data/north_america_informal.yaml
2007-12-19 23:25:56 +01:00
class UsDefinitionTests < Test::Unit::TestCase # :nodoc:
def test_us
2008-01-15 05:29:21 +01:00
{Date.civil(2008,1,1) => 'New Year\'s Day',
Date.civil(2008,1,21) => 'Martin Luther King, Jr. Day',
Date.civil(2008,2,18) => 'Presidents\' 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,10,13) => 'Columbus Day',
Date.civil(2008,11,11) => 'Veterans Day',
Date.civil(2008,11,27) => 'Thanksgiving',
Date.civil(2008,12,25) => 'Christmas Day'}.each do |date, name|
assert_equal name, Holidays.on(date, :us)[0][:name]
2007-12-19 23:25:56 +01:00
end
end
end