rdf-ex/test/support/test_data.ex

15 lines
255 B
Elixir
Raw Normal View History

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