Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

+ more speed specs

  • Loading branch information...
commit eda887f6fa2c6033523a3cb03150482a0e956f7a 1 parent a050691
@floere authored
Showing with 15 additions and 3 deletions.
  1. +15 −3 spec/lib/phony_spec.rb
View
18 spec/lib/phony_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.