Sha256: 9c15cbee1cfd1e4f459d0cc48ed0dca6194a6558db9112982860c8e31d642a93
Contents?: true
Size: 823 Bytes
Versions: 7
Compression:
Stored size: 823 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe Geometry do before(:each) do @geo = Geometry.new end it "should instantiate" do violated unless @geo end it "should have a default srid" do @geo.srid.should eql(4326) #Geometry.default_srid) end it "should change srid" do geo = Geometry.new(225) geo.srid.should eql(225) end it "should instantiate from hex ewkb" do point = Geometry.from_hex_ewkb("01010000207B000000CDCCCCCCCCCC28406666666666A64640") point.class.should == Point point.x.should be_close(12.4, 0.1) end it "should output as_ewkb" do @geo.stub!(:binary_geometry_type).and_return(1) @geo.stub!(:binary_representation).and_return(1) @geo.as_ewkb.should eql("\001\001\000\000 \346\020\000\000\001") end end
Version data entries
7 entries across 7 versions & 3 rubygems