jsonld-ex/test/support/test_data.ex

13 lines
255 B
Elixir
Raw Normal View History

defmodule JSON.LD.TestData do
2020-06-20 02:25:58 +00:00
@dir Path.join(File.cwd!(), "test/data/")
def dir, do: @dir
def file(name) do
if File.exists?(path = Path.join(@dir, name)) do
path
else
raise "Test data file '#{name}' not found"
end
end
end