diff --git a/test/juggler_test.exs b/test/juggler_test.exs index 1b718e6..920c06a 100644 --- a/test/juggler_test.exs +++ b/test/juggler_test.exs @@ -2,7 +2,22 @@ defmodule JugglerTest do use ExUnit.Case doctest Juggler + @tmp_path Path.expand("../tmp", __DIR__) + + setup do + File.mkdir_p!(@tmp_path) + on_exit(fn -> File.rm_rf(@tmp_path) end) + :ok + end + test "greets the world" do - assert Juggler.hello() == :world + File.cd!( + @tmp_path, + fn -> + refute File.exists?("juggles.exs") + assert Juggler.init() == :ok + assert File.exists?("juggles.exs") + end + ) end end