Sha256: b4f1c1f3a9b25430e3963c16d23c00a0d19f7acf05014317493dd4a1f0f365f1
Contents?: true
Size: 827 Bytes
Versions: 9
Compression:
Stored size: 827 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_within(0.1).of(12.4) 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
9 entries across 9 versions & 2 rubygems