File name conventions for fixtures with ERB

There’s this convention in Rails that when a file is first processed before the final output (e.g. from Sass to CSS or from ERB to HTML), names of those preprocessors are included in the file extension. So if I wanted “foo.css” to be generated from Sass, I’d call the file “foo.css.scss”. And if I wanted (for whatever reason) to generate some of that Sass using ERB, it would be “foo.css.scss.erb”.

But test fixtures are always .yml — and they allow ERB to be embedded inside. In fact, not only does ERB work with “posts.yml”, it won’t work at all if I named the file “posts.yml.erb” (just says "NoMethodError: undefined method `posts’ ")

This got me confused today — when I needed to add some ERb to my fixtures. I know I’m nitpicking, but it seems bizarre to break this convention.

Am I missing something?

Are you sure about this? I found it odd since I have used file.yml.erb successfully in the past. Can you provide a test case? And it fails, I think you should post it as a Github issue.