25 lines
800 B
Ruby
25 lines
800 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/at.yaml
|
||
|
class AtDefinitionTests < Test::Unit::TestCase # :nodoc:
|
||
|
|
||
|
def test_at
|
||
|
{Date.civil(2009,1,1) => 'Neujahrstag',
|
||
|
Date.civil(2009,4,13) => 'Ostermontag',
|
||
|
Date.civil(2009,5,1) => 'Staatsfeiertag',
|
||
|
Date.civil(2009,5,21) => 'Christi Himmelfahrt',
|
||
|
Date.civil(2009,6,1) => 'Pfingstmontag',
|
||
|
Date.civil(2009,10,26) => 'Nationalfeiertag',
|
||
|
Date.civil(2009,12,25) => '1. Weihnachtstag',
|
||
|
Date.civil(2009,12,26) => '2. Weihnachtstag'}.each do |date, name|
|
||
|
assert_equal name, (Holidays.on(date, :at, :informal)[0] || {})[:name]
|
||
|
end
|
||
|
|
||
|
assert !Date.civil(2010,5,8).holiday?(:at), '2010-05-08 is not a holiday in Austria'
|
||
|
|
||
|
end
|
||
|
end
|