Skip to content

Commit

Permalink
Utilities::Geo.degrees_minutes_seconds_to_decimal_degrees([multiple u…
Browse files Browse the repository at this point in the history
…se cases]) progress on special symbols.
  • Loading branch information
TuckerJD committed Dec 8, 2014
1 parent 300825a commit 94ae39f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion spec/lib/utilities/geo_spec.rb
Expand Up @@ -137,9 +137,11 @@
end

context 'multiple use cases' do
@entry = 0

LATLONG_USE_CASES.each { |co_ordinate, result|
specify "case #{co_ordinate} should yield #{result}" do
@entry += 1
specify "case #{@entry}: #{co_ordinate} should yield #{result}" do
# pending 'full construction of the use_case hash'
expect(Utilities::Geo.degrees_minutes_seconds_to_decimal_degrees(co_ordinate)).to eq(result)
end
Expand Down
4 changes: 2 additions & 2 deletions spec/support/geo/geo.rb
Expand Up @@ -5,9 +5,9 @@

# http://en.wikiversity.org/wiki/Geographic_coordinate_conversion

SPECIAL_LATLONG_SYMBOLS = "º*\"∞∫o'¥ \u02DA\u00ba\u00ba\u02B9\u02BA\u02BC\u02CA\u02EE\u02DA\u030a"
SPECIAL_LATLONG_SYMBOLS = "Ddº*\"∞∫o'¥ \u02DA\u00ba\u00ba\u02B9\u02BA\u02BC\u02CA\u02EE\u02DA\u030a"

LATLONG_USE_CASES = {" 40\u02da26¥46¥S" => '40.446111', #current test case
LATLONG_USE_CASES = {" 40\u02da26¥46¥S" => '40.446111', #current test case
'40º26\'46"N' => '40.446111', # using MAC-native symbols
'079º58\'56"W' => '-79.982222', # using MAC-native symbols
'40:26:46.302N' => '40.446195',
Expand Down

0 comments on commit 94ae39f

Please sign in to comment.