Update runtime JSON parsing to use new structure

This commit is contained in:
Michael Miller 2021-06-02 23:59:42 -06:00
parent 15c5b0991d
commit 103597a7be
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436

View file

@ -44,8 +44,8 @@ module Spectator::SpecHelpers
# Extracts the result information from a `JSON::Any` object.
def self.from_json_any(object : JSON::Any)
name = object["name"].as_s
outcome = parse_outcome_string(object["result"].as_s)
name = object["description"].as_s
outcome = parse_outcome_string(object["status"].as_s)
expectations = if (list = object["expectations"].as_a?)
list.map { |e| Expectation.from_json_any(e) }
else