Skip to content

Commit

Permalink
+ Hej Danmark!
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Nov 30, 2010
1 parent e32f33e commit 9c99b67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/phony/countries/all_other.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def self.mapping
), ),
'43' => Countries::Austria, '43' => Countries::Austria,
'44' => fixed(2), # TODO United Kingdom of Great Britain and Northern Ireland '44' => fixed(2), # TODO United Kingdom of Great Britain and Northern Ireland
'45' => fixed(2), # TODO Denmark '45' => fixed(2, # Denmark
:local_format => [2, 2, 2]
),
'46' => Countries::Sweden, '46' => Countries::Sweden,
'47' => fixed(4, # Norway '47' => fixed(4, # Norway
:local_format => [4] :local_format => [4]
Expand Down
3 changes: 3 additions & 0 deletions spec/lib/phony_spec.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
it "should handle austrian numbers" do it "should handle austrian numbers" do
Phony.split('43198110').should == ['43', '1', '98110'] Phony.split('43198110').should == ['43', '1', '98110']
end end
it 'handles danish numbers' do
Phony.split('4532121212').should == ['45', '32', '12', '12', '12']
end
it "should handle dutch numbers" do it "should handle dutch numbers" do
Phony.split('31612345678').should == ['31', '6', '12345678'] # mobile Phony.split('31612345678').should == ['31', '6', '12345678'] # mobile
Phony.split('31201234567').should == ['31', '20', '1234567'] Phony.split('31201234567').should == ['31', '20', '1234567']
Expand Down

0 comments on commit 9c99b67

Please sign in to comment.