Sha256: 153e6454d29a6941fc61eeecc3c48c5223b0aa57c0d6b0888015bb5abd3ee352

Contents?: true

Size: 431 Bytes

Versions: 3

Compression:

Stored size: 431 Bytes

Contents

describe "CoreLocation" do
  before do
    @denver = CLLocationCoordinate2D.new(39.764032, -104.963112)
    @cincinnati = CLLocationCoordinate2D.new(39.267024, -84.251736)
  end

  it "should calculate distance in miles" do
    @denver.distance_to(@cincinnati).in_miles.round.should == 1105
  end

  it "should calculate distance in kilometers" do
    @denver.distance_to(@cincinnati).in_kilometers.round.should == 1778
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sugarcube-4.0.0 spec/ios/core_location_spec.rb
sugarcube-3.5.0 spec/ios/core_location_spec.rb
sugarcube-3.4.2 spec/ios/core_location_spec.rb