holidays/test/defs/test_defs_nz.rb
2010-04-29 01:13:56 +12:00

22 lines
666 B
Ruby

require File.dirname(__FILE__) + '/../test_helper'
# This file is generated by the Ruby Holiday gem.
#
# Definitions loaded: data/nz.yaml
class NzDefinitionTests < Test::Unit::TestCase # :nodoc:
def test_nz
{Date.civil(2007,1,1) => 'New Year\'s Day',
Date.civil(2007,1,2) => 'Day after New Year\'s Day',
Date.civil(2007,2,6) => 'Waitangi Day',
Date.civil(2007,4,6) => 'Good Friday',
Date.civil(2007,4,9) => 'Easter Monday',
Date.civil(2007,4,25) => 'ANZAC Day',
Date.civil(2007,12,25) => 'Christmas Day',
Date.civil(2007,12,26) => 'Boxing Day'}.each do |date, name|
assert_equal name, (Holidays.on(date, :nz, :informal)[0] || {})[:name]
end
end
end