Deirdre Saoirse Moen

Sounds Like Weird

Test Fixtures/YAML tip

05 October 2005

I wound up getting an error in my test fixtures that it took me a while to figure out, in part because the text in that part of the fixture was several pages long. Here’s the error:

Fixture::FormatError: a YAML error occured parsing ./test/unit/../fixtures/stories.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at

The real issue in my case was having an unescaped colon in the data. And, as it took me a while to find out exactly how to escape a colon in YAML, you just do it by putting double quotes around the colon.

I hope this saves someone some time.

Related Posts