2008-12-30 20:43:29 +01:00
|
|
|
require File.dirname(__FILE__) + '/../test_helper'
|
|
|
|
require 'holidays/de'
|
|
|
|
|
|
|
|
# This file is generated by the Ruby Holiday gem.
|
|
|
|
#
|
|
|
|
# Definitions loaded: data/de.yaml
|
|
|
|
class DeDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
|
|
|
|
|
|
def test_de
|
|
|
|
{Date.civil(2009,1,1) => 'Neujahrstag',
|
|
|
|
Date.civil(2009,4,10) => 'Karfreitag',
|
|
|
|
Date.civil(2009,4,12) => 'Ostern',
|
|
|
|
Date.civil(2009,4,13) => 'Ostermontag',
|
|
|
|
Date.civil(2009,5,1) => 'Tag der Arbeit',
|
|
|
|
Date.civil(2009,5,21) => 'Christi Himmelfahrt',
|
|
|
|
Date.civil(2009,6,1) => 'Pfingstmontag',
|
|
|
|
Date.civil(2009,10,3) => 'Tag der Deutschen Einheit',
|
|
|
|
Date.civil(2009,12,25) => '1. Weihnachtstag',
|
|
|
|
Date.civil(2009,12,26) => '2. Weihnachtstag'}.each do |date, name|
|
|
|
|
assert_equal name, Holidays.on(date, :de, :informal)[0][:name]
|
|
|
|
end
|
|
|
|
|
|
|
|
[:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn, :de_th, :de_].each do |r|
|
|
|
|
assert_equal 'Fronleichnam', Date.civil(2009,6,11).holidays(r)[0][:name]
|
|
|
|
end
|
|
|
|
|
|
|
|
[:de_by, :de_sl, :de_].each do |r|
|
|
|
|
assert_equal 'Mariä Himmelfahrt', Date.civil(2009,8,15).holidays(r)[0][:name]
|
|
|
|
end
|
|
|
|
|
|
|
|
[:de_bb, :de_mv, :de_sn, :de_st, :de_th, :de_].each do |r|
|
|
|
|
assert_equal 'Reformationstag', Date.civil(2009,10,31).holidays(r)[0][:name]
|
|
|
|
end
|
|
|
|
|
|
|
|
[:de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_].each do |r|
|
|
|
|
assert_equal 'Allerheiligen', Date.civil(2009,11,1).holidays(r)[0][:name]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Repentance Day
|
|
|
|
assert_equal 'Buß- und Bettag', Date.civil(2004,11,17).holidays(:de_sn)[0][:name]
|
|
|
|
assert_equal 'Buß- und Bettag', Date.civil(2005,11,16).holidays(:de_sn)[0][:name]
|
|
|
|
assert_equal 'Buß- und Bettag', Date.civil(2006,11,22).holidays(:de_sn)[0][:name]
|
|
|
|
assert_equal 'Buß- und Bettag', Date.civil(2009,11,18).holidays(:de_sn)[0][:name]
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|