Sha256: c457925c54c428ded8b66fe57c3543dcc5117c506caf9c496c8f23d2da87eba9

Contents?: true

Size: 563 Bytes

Versions: 1

Compression:

Stored size: 563 Bytes

Contents

FactoryGirl.define do  

  factory :junction, :class => ActiveRoad::Junction do
    sequence(:objectid) { |n| "junction::#{n}" }
    geometry GeoRuby::SimpleFeatures::Point.from_x_y(2.2946, 48.8580, ActiveRoad.srid)
  end

  factory :junction_with_physical_roads, :class => ActiveRoad::Junction do
    sequence(:objectid) { |n| "junction::#{n}" }
    geometry GeoRuby::SimpleFeatures::Point.from_x_y(2.2946, 48.8580, ActiveRoad.srid)

    after(:create) do |junction|
      junction.physical_roads = FactoryGirl.create_list(:physical_road, 2)
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_road-0.0.2 spec/factories/junction.rb