Skip to content

Commit

Permalink
Added Carmen#states? to check if states are supported for a given cou…
Browse files Browse the repository at this point in the history
…ntry
  • Loading branch information
jim committed Aug 26, 2009
1 parent e31e60b commit 2a982e1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/carmen_test.rb
Expand Up @@ -52,4 +52,17 @@ def test_state_codes
assert_equal 'AB', Carmen.state_codes('CA').first
end

def test_supported_states
assert Carmen::states?('US')
assert_equal Carmen::states?('ZZ'), false
end

def test_unsupported_states_exception
assert_raises Carmen::StatesNotSupported do
Carmen::state_codes('ZZ')
end
end



end

0 comments on commit 2a982e1

Please sign in to comment.