Я хочу перебрать массив хэшей, но я продолжаю получать TypeError: неявное преобразование Symbol в целочисленную ошибку.Когда я печатаю значения, они отображаются, как и ожидалось, но я получаю ошибку независимо.
$portal_automation_version_set = 'PhotonPortalUIAutomation/development'
$package = 'PhotonUIAutomationTests-1.0'
$todworker = 'TodWorker/Photon/Prod'
$one_drive_test_name = 'One drive tests'
$gdrive_test_name = 'Gdrive storage tests'
$streaming_test_name = 'Portal streaming tests'
$beta_sanity_test_name = 'Beta-pdx Sanity'
$one_drive_test_target = '-Dtestngfile=portal-onedrive-storage-test.xml run-fire-test'
$gdrive_test_target = '-Dtestngfile=portal-storage-sanity-test.xml run-fire-test'
$streaming_test_target = '-Dtestngfile=portal-streaming-tests.xml run-fire-test'
$beta_sanity_test_target = '-Dtestngfile=portal-smoke-tests.xml run-fire-test'
$stage_sanity_test_map = {
Beta:
[
{
sanity_test_name: $one_drive_test_name,
sanity_test_target: $one_drive_test_name,
depends_on: nil
},
{
sanity_test_name: $gdrive_test_name,
sanity_test_target: $gdrive_test_target,
depends_on: $one_drive_test_name
},
{
sanity_test_name: $streaming_test_name,
sanity_test_target: $streaming_test_target,
depends_on: $gdrive_test_name
},
{
sanity_test_name: $beta_sanity_test_name,
sanity_test_target: $beta_sanity_test_target,
depends_on: $streaming_test_name
}
]
}
$stage_sanity_test_map[:Beta].each do | key |
puts key[:sanity_test_name]
end