local U=require("\112\108\046\102\105\108\101")local e=require("\112\108\046\112\097\116\104")local Q=require("\115\117\112\112\111\114\116\046\115\111\117\114\099\101")local R={}local k=e.abspath(e.join(Q.dir(),"\046\046","\046\046"))local A=e.join(k,"\115\112\101\099")local C=e.join(A,"\115\117\112\112\111\114\116","\102\105\120\116\117\114\101\115")function R.path(...)return e.join(C,...)end function R.read(...)return U.read(R.path(...))end function R.require(U)U=U:gsub("\037\046","\095")local Q=R.path(U)local k=(e.relpath(Q,A)):gsub("\047","\046")return require(k)end return R
local file = require("pl.file")
local path = require("pl.path")
local source = require("support.source")

local M = {}

local ROOT_PATH = path.abspath(path.join(source.dir(), "..", ".."))
local SPEC_PATH = path.join(ROOT_PATH, "spec")
local FIXTURES_PATH = path.join(SPEC_PATH, "support", "fixtures")

function M.path(...)
  return path.join(FIXTURES_PATH, ...)
end

function M.read(...)
  return file.read(M.path(...))
end

function M.require(filename)
  filename = filename:gsub("%.", "_")

  local packagePath = M.path(filename)
  local package = path.relpath(packagePath, SPEC_PATH):gsub("/", ".")

  return require(package)
end

return M
