module FileFixtures
Ruby on Rails 5.1.7
Since v5.0.7.2Adds simple access to sample files called file fixtures. File fixtures are normal files stored in ActiveSupport::TestCase.file_fixture_path.
File fixtures are represented as Pathname objects. This makes it easy to extract specific information:
file_fixture("example.txt").read # get the file's content
file_fixture("example.mp3").size # get the file size