Sha256: beaadc01b1447778b2a05b0cd2c2dbb2fe4a70ef1fc02e986abd7db5ee498f00
Contents?: true
Size: 693 Bytes
Versions: 2
Compression:
Stored size: 693 Bytes
Contents
FactoryGirl.define do factory :route_common, :class => Chouette::Route do sequence(:name) { |n| "Route #{n}" } sequence(:published_name) { |n| "Long route #{n}" } sequence(:number) { |n| "#{n}" } sequence(:wayback_code) { |n| Chouette::Wayback.new( n % 2) } sequence(:direction_code) { |n| Chouette::Direction.new( n % 12) } sequence(:objectid) { |n| "test:Route:#{n}" } association :line, :factory => :line factory :route do transient do stop_points_count 5 end after(:create) do |route, evaluator| create_list(:stop_point, evaluator.stop_points_count, route: route) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ninoxe-1.2.3 | spec/factories/chouette_routes.rb |
ninoxe-1.2.0 | spec/factories/chouette_routes.rb |