bus-detective/bus-detective

View on GitHub
spec/factories/route_stops_factory.rb

Summary

Maintainability
A
0 mins
Test Coverage
FactoryGirl.define do
  factory :route_stop do
    after(:build) do |rs|
      agency = build(:agency)
      rs.route = build(:route, agency: agency) unless rs.route
      rs.stop = build(:stop, agency: agency) unless rs.stop
    end
  end
end