Browse files

improved spec for coord_mode

  • Loading branch information...
1 parent 781a528 commit 526173f4edaa313d3bf3435d394d9b98a7b006ff @kristianmandrup committed Jun 21, 2011
Showing with 17 additions and 1 deletion.
  1. +17 −1 spec/geo_calc/core_ext/coord_mode_spec.rb
View
18 spec/geo_calc/core_ext/coord_mode_spec.rb
@@ -23,12 +23,20 @@ class GeoPoint
it 'should reverse array' do
[2, 3].to_lng_lat.should == [3, 2]
end
+
+ it 'should reverse array and convert strings to floats' do
+ ["23.5", "-48"].to_lng_lat.should == [-48, 23.5]
+ end
end
describe '#to_lat_lng' do
it 'should not reverse array' do
[2, 3].to_lat_lng.should == [2, 3]
end
+
+ it 'should not reverse array but convert strings to floats' do
+ ["23.5", "-48"].to_lat_lng.should == [23.5, -48]
+ end
end
end # Array
@@ -59,12 +67,20 @@ class GeoPoint
it 'should not reverse array' do
[2, 3].to_lng_lat.should == [2, 3]
end
+
+ it 'should not reverse array but convert strings to floats' do
+ ["23.5", "-48"].to_lng_lat.should == [23.5, -48]
+ end
end
describe '#to_lat_lng' do
it 'should reverse array' do
[2, 3].to_lat_lng.should == [3, 2]
- end
+ end
+
+ it 'should reverse array and convert strings to floats' do
+ ["23.5", "-48"].to_lat_lng.should == [-48, 23.5]
+ end
end
end # Array

0 comments on commit 526173f

Please sign in to comment.