YAML fixtures can be parsed into a Ruby object using the #from_yaml method.
#from_yaml
This is equivalent to YAML.safe_load(..., symbolize_names: true).
YAML.safe_load(..., symbolize_names: true)
Keys are symbolized by default. If you prefer to work with strings, pass symbolize_names: false:
symbolize_names: false