diff --git a/test/http_to_do_test.exs b/test/http_to_do_test.exs index 71d0f2f..a5efb65 100644 --- a/test/http_to_do_test.exs +++ b/test/http_to_do_test.exs @@ -1,6 +1,6 @@ defmodule HTTPServerTest.ToDo do alias ToDo.API - use ExUnit.Case + use ExUnit.Case, async: false doctest HTTPServer @file_path Application.compile_env( @@ -9,9 +9,9 @@ defmodule HTTPServerTest.ToDo do "lib/http_server_test_fixture/mock_data/test-data.json" ) - setup do + setup_all do act_arrange_test_todo = JSON.encode!(%{"1" => %{"todo1" => "Act"}, "2" => %{"todo2" => "Arrange"}}) - File.write!(@file_path, act_arrange_test_todo) + File.write(@file_path, act_arrange_test_todo) on_exit(fn -> if File.exists?(@file_path), do: File.rm!(@file_path) end) :ok end