Best way to write test for a GenServer interacting with the filesystem

Well, actually that’s more about the right way to do it.
Should I create a fake/temporary files tree (eg on /tmp) and play with it, or should I just run the GenServer on the app itself and touch a file (feels wrong to do it during a test).
My other question is how can I assert the GenServer did its job ? (in verbose mode i have some output, but I’m not sure that’s the best way).
The server send itself a cast when it detects a file change, which run Mix.Tasks.Compile.Elixir