Permalink
Browse files

+ more speed specs

  • Loading branch information...
1 parent a050691 commit eda887f6fa2c6033523a3cb03150482a0e956f7a @floere committed Nov 19, 2010
Showing with 15 additions and 3 deletions.
  1. +15 −3 spec/lib/phony_spec.rb
View
@@ -171,7 +171,7 @@
end
end
- describe "speed" do
+ context "speed" do
before(:each) do
@phone_numbers = [
'41443643532',
@@ -181,8 +181,20 @@
'4233841148'
]
end
- it 'is fast' do
- performance_of { @phone_numbers.each { |number| Phony.split(number) } }.should < 0.0002
+ describe 'split' do
+ it 'is fast' do
+ performance_of { @phone_numbers.each { |number| Phony.split(number) } }.should < 0.00015
+ end
+ end
+ describe 'normalize' do
+ it 'is fast' do
+ performance_of { @phone_numbers.each { |number| Phony.normalize(number) } }.should < 0.00015
+ end
+ end
+ describe 'formatted' do
+ it 'is fast' do
+ performance_of { @phone_numbers.each { |number| Phony.formatted(number) } }.should < 0.00015
+ end
end
end

0 comments on commit eda887f

Please sign in to comment.