2010-11-12 23:26:33 +01:00
|
|
|
$:.unshift(File.expand_path(File.dirname(__FILE__) + '../../lib/'))
|
2007-11-25 00:22:10 +01:00
|
|
|
|
2010-11-12 23:30:17 +01:00
|
|
|
$KCODE = 'u' if RUBY_VERSION =~ /^1\.8/
|
2007-11-25 00:22:10 +01:00
|
|
|
|
2007-11-20 01:58:20 +01:00
|
|
|
require 'rubygems'
|
|
|
|
require 'test/unit'
|
2007-11-21 01:13:18 +01:00
|
|
|
require 'date'
|
2007-11-20 01:58:20 +01:00
|
|
|
require 'holidays'
|
2007-11-22 21:39:26 +01:00
|
|
|
require 'holidays/ca'
|
2010-11-12 23:26:33 +01:00
|
|
|
|
|
|
|
module Holidays
|
|
|
|
# Test region used for generating a holiday on Date.today
|
|
|
|
module Test # :nodoc:
|
|
|
|
DEFINED_REGIONS = [:test]
|
|
|
|
|
|
|
|
HOLIDAYS_BY_MONTH = {
|
|
|
|
Date.today.mon => [{:mday => Date.today.mday, :name => "Test Holiday", :regions => [:test]}]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Holidays.merge_defs(Holidays::Test::DEFINED_REGIONS, Holidays::Test::HOLIDAYS_BY_MONTH)
|