module FileFixtures
Ruby on Rails 6.0.6
Since v5.2.8.1Adds 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