Sha256: d6d036a0dfb8e1cc74bbcc5eb25efb345481662144f515fdc49a6632243bbe3a
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
require 'spec_helper' describe ActiveRoad::AccessPoint do let!(:ab) { create(:physical_road, :geometry => line_string( "0 0,1 0" ), :minimum_width => :wide ) } subject { ActiveRoad::Accesspoint.new( :location => point(0, 0), :physical_road => ab ) } describe ".from" do it "should return all access point with tags from the location" do access_points = ActiveRoad::AccessPoint.from( point(0, 0), { :minimum_width => :wide } ) access_points.size.should == 1 end it "should return all access point from the location with tags not in physical roads" do access_points = ActiveRoad::AccessPoint.from( point(0, 0), { :minimum_width => :narrow } ) access_points.size.should == 0 end end describe ".to" do it "should return all access point with tags from the location" do access_points = ActiveRoad::AccessPoint.to( point(0, 0), { :minimum_width => :wide } ) access_points.size.should == 1 end it "should return all access point from the location with tags not in physical roads" do access_points = ActiveRoad::AccessPoint.to( point(0, 0), { :minimum_width => :narrow } ) access_points.size.should == 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_road-0.0.2 | spec/models/active_road/access_point_spec.rb |