If your code outputs YAML, use the ```rspec:yaml
formatter to prettify your YAML output. Note that your code must produce a raw YAML string in order to use this formatter, it does not convert Ruby objects into YAML.
```rspec:yaml
subject(:yaml) do
{
'key' => 'value',
'array' => [1, 2, 3],
'boolean' => true,
'otherBoolean' => false
}.to_yaml
end
it 'has expected key/value' do
expect(YAML.safe_load(yaml)).to include({ 'key' => 'value' })
end
```