Track fixture files as external resources
This commit is contained in:
@@ -2,6 +2,7 @@ defmodule MusicBrainz.Fixtures.Artist do
|
||||
@fixtures_folder Path.join([File.cwd!(), "test/support/fixtures/music_brainz"])
|
||||
|
||||
# Cache fixtures at compile time to avoid repeated file I/O
|
||||
@external_resource Path.join([@fixtures_folder, "artist - steven wilson.json"])
|
||||
@get_artist Path.join([@fixtures_folder, "artist - steven wilson.json"])
|
||||
|> File.read!()
|
||||
|> JSON.decode!()
|
||||
|
||||
Reference in New Issue
Block a user