36 lines
1,013 B
Ruby
36 lines
1,013 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/li.yaml
|
||
|
class LiDefinitionTests < Test::Unit::TestCase # :nodoc:
|
||
|
|
||
|
def test_li
|
||
|
{Date.civil(2009,1,1) => 'Neujahrstag',
|
||
|
Date.civil(2011,3,8) => 'Fasnachtsdienstag',
|
||
|
Date.civil(2009,4,10) => 'Karfreitag',
|
||
|
Date.civil(2009,4,12) => 'Ostern',
|
||
|
Date.civil(2009,4,13) => 'Ostermontag',
|
||
|
Date.civil(2009,5,21) => 'Auffahrt',
|
||
|
Date.civil(2009,6,1) => 'Pfingstmontag',
|
||
|
Date.civil(2009,12,25) => 'Weihnachten',
|
||
|
Date.civil(2009,12,26) => 'Stefanstag'}.each do |date, name|
|
||
|
assert_equal name, Holidays.on(date, :li, :informal)[0][:name]
|
||
|
end
|
||
|
|
||
|
[:li].each do |r|
|
||
|
assert_equal 'Fronleichnam', Date.civil(2009,6,11).holidays(r)[0][:name]
|
||
|
end
|
||
|
|
||
|
[:li].each do |r|
|
||
|
assert_equal 'Staatsfeiertag', Date.civil(2009,8,15).holidays(r)[0][:name]
|
||
|
end
|
||
|
|
||
|
[:li].each do |r|
|
||
|
assert_equal 'Allerheiligen', Date.civil(2009,11,1).holidays(r)[0][:name]
|
||
|
end
|
||
|
|
||
|
end
|
||
|
end
|