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