Sha256: f6831581f7472158bd1e9d852e7999aae011a01a08efe956b89b13700b40a5bd

Contents?: true

Size: 608 Bytes

Versions: 7

Compression:

Stored size: 608 Bytes

Contents

require 'spec_helper'

class CalcApis
  include GeoCalc
end

class CalcDistance
  include GeoCalc::Distance
end



# - www.movable-type.co.uk/scripts/latlong.html
describe GeoPoint do 
  describe 'include all Apis' do
    it 'should have Bearing api' do
      CalcApis.new.should respond_to :bearing_to
    end
  end

  describe 'include select Apis' do
    it 'should not have Bearing api' do
      dist = CalcDistance.new
      dist.should_not respond_to :bearing_to
    end
    
    it 'should have Distance api' do
      dist = CalcDistance.new
      dist.should respond_to :distance_to
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
geo_calc-0.7.8 spec/geo_calc/include_apis_spec.rb
geo_calc-0.7.7.1 spec/geo_calc/include_apis_spec.rb
geo_calc-0.7.7 spec/geo_calc/include_apis_spec.rb
geo_calc-0.7.6 spec/geo_calc/include_apis_spec.rb
geo_calc-0.7.5 spec/geo_calc/include_apis_spec.rb
geo_calc-0.7.4 spec/geo_calc/include_apis_spec.rb
geo_calc-0.7.3 spec/geo_calc/include_apis_spec.rb