Use file_fixture for files in spec/fixtures/files.
For example, to access spec/fixtures/files/example.png:
file_fixture('example.png')This returns a Pathname. Use file_fixture('example.png').read to access the content of the file.
Mar 13, 2026
Use file_fixture for files in spec/fixtures/files.
For example, to access spec/fixtures/files/example.png:
file_fixture('example.png')This returns a Pathname. Use file_fixture('example.png').read to access the content of the file.