holidays/test/test_helper.rb

23 lines
567 B
Ruby
Raw Normal View History

$:.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'
require 'date'
2007-11-20 01:58:20 +01:00
require 'holidays'
require 'holidays/ca'
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)