Ad
  • Custom User Avatar

    how 2 blue honda can counted twice in test 2?

    puts "Another Static test ('blue honda' is counted twice):"

    DB[:traffic_observations].delete
    
    DB[:traffic_observations].multi_insert([
      {datetime: Time.parse('2024-06-25 09:50:00'), type: 'white toyota', traffic_light_id: 1},
      {datetime: Time.parse('2024-06-25 09:55:30'), type: 'black bmw', traffic_light_id: 1},
      {datetime: Time.parse('2024-06-25 10:05:15'), type: 'blue honda', traffic_light_id: 1},
      {datetime: Time.parse('2024-06-25 09:55:45'), type: 'black bmw', traffic_light_id: 2},
      {datetime: Time.parse('2024-06-25 10:05:45'), type: 'green ford', traffic_light_id: 2},
      {datetime: Time.parse('2024-06-25 11:00:00'), type: 'black bmw', traffic_light_id: 1},
      {datetime: Time.parse('2024-06-25 11:10:30'), type: 'red toyota', traffic_light_id: 1}
    ])