Fix spelling mistake in errors

master
Rowan Crawford 2010-03-28 15:23:35 +13:00
parent acea5b6cf1
commit f7118f37ad
2 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ require 'date'
# Holidays.between(from, to, :ca_bc, :informal)
module Holidays
# Exception thrown when an unknown region is requested.
class UnkownRegionError < ArgumentError; end
class UnknownRegionError < ArgumentError; end
VERSION = '0.9.2'
@ -257,7 +257,7 @@ private
regions.flatten!
raise UnkownRegionError unless regions.all? { |r| r == :any or @@regions.include?(r) }
raise UnknownRegionError unless regions.all? { |r| r == :any or @@regions.include?(r) }
regions
end

View File

@ -31,15 +31,15 @@ class HolidaysTests < Test::Unit::TestCase
end
def test_requires_valid_regions
assert_raises Holidays::UnkownRegionError do
assert_raises Holidays::UnknownRegionError do
Holidays.on(Date.civil(2008,1,1), :xx)
end
assert_raises Holidays::UnkownRegionError do
assert_raises Holidays::UnknownRegionError do
Holidays.on(Date.civil(2008,1,1), [:ca,:xx])
end
assert_raises Holidays::UnkownRegionError do
assert_raises Holidays::UnknownRegionError do
Holidays.between(Date.civil(2008,1,1), Date.civil(2008,12,31), [:ca,:xx])
end
end