23 lines
702 B
Ruby
23 lines
702 B
Ruby
# encoding: utf-8
|
|
require File.expand_path(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
|