jsonld-ex/test/support/test_data.ex
2017-03-24 23:13:05 +01:00

14 lines
255 B
Elixir

defmodule JSON.LD.TestData do
@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