2017-02-10 15:14:42 +00:00
|
|
|
defmodule RDF.TestData do
|
2020-06-29 08:37:42 +00:00
|
|
|
@dir Path.join(File.cwd!(), "test/data/")
|
2017-02-10 15:14:42 +00:00
|
|
|
def dir, do: @dir
|
|
|
|
|
|
|
|
def file(name) do
|
2020-06-29 08:37:42 +00:00
|
|
|
if (path = Path.join(@dir, name)) |> File.exists?() do
|
2017-02-10 15:14:42 +00:00
|
|
|
path
|
|
|
|
else
|
|
|
|
raise "Test data file '#{name}' not found"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|