Sha256: ee5a269d572d8b38d34da05bb75a46e833a4287ceab3e7b2689bae5f5e837cf6

Contents?: true

Size: 703 Bytes

Versions: 3

Compression:

Stored size: 703 Bytes

Contents

require "spec_helper"

describe Proj4::Projection do
  
  describe ".for_srid" do
    
    it "should return wgs84 projection for srid 4326" do
      Proj4::Projection.for_srid(4326).should == Proj4::Projection.wgs84
    end

    it "should return wgs84 projection for srid 900913" do
      Proj4::Projection.for_srid(900913).should == Proj4::Projection.google
    end

    it "should return built projection projection for srid 27572" do
      Proj4::Projection.for_srid(27572).definition.include?('epsg:27572').should be_true
    end

    it "should raise an error when srid isn't supported" do
      lambda do
        Proj4::Projection.for_srid(123)
      end.should raise_error
    end

  end


end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
georuby-ext-0.0.5 spec/lib/proj4_spec.rb
georuby-ext-0.0.4 spec/lib/proj4_spec.rb
georuby-ext-0.0.3 spec/lib/proj4_spec.rb