holidays/test/defs/test_defs_nz.rb
2010-04-28 18:28:39 +12:00

23 lines
680 B
Ruby

require File.dirname(__FILE__) + '/../test_helper'
require 'holidays/nz'
# 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