Skip to content

Commit

Permalink
+ correct the order: First, the special code ought to be applied, the…
Browse files Browse the repository at this point in the history
…n the national code.
  • Loading branch information
floere committed Feb 13, 2011
1 parent a2aadc5 commit ec7823c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/lib/phony/country_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@

context "without special cases" do
before(:each) do
national_splitter = Phony::NationalSplitters::Variable.new 4, { :normal => ['44'] }
local_splitter = Phony::LocalSplitter.instance_for [3, 2, 2]
national_code = Phony::NationalCode.new national_splitter, local_splitter

special_national_splitter = Phony::NationalSplitters::Variable.new nil, { :service => ['800'] }
special_local_splitter = Phony::LocalSplitter.instance_for [3, 3]
special_code = Phony::NationalCode.new special_national_splitter, special_local_splitter

@switzerland = Phony::Country.new national_code, special_code
national_splitter = Phony::NationalSplitters::Variable.new 4, { :normal => ['44'] }
local_splitter = Phony::LocalSplitter.instance_for [3, 2, 2]
national_code = Phony::NationalCode.new national_splitter, local_splitter

@switzerland = Phony::Country.new special_code, national_code
end

describe "split" do
Expand Down

0 comments on commit ec7823c

Please sign in to comment.