holidays/test/defs/test_defs_nz.rb

23 lines
680 B
Ruby
Raw Normal View History

2010-03-28 21:52:00 +02:00
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',
2010-03-28 21:52:00 +02:00
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