Skip to content

Commit

Permalink
setup --> setup_all and File.write! --> File.write
Browse files Browse the repository at this point in the history
  • Loading branch information
kelseyroy committed Jul 20, 2023
1 parent a6336f9 commit 692dd96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/http_to_do_test.exs
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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
Expand Down

0 comments on commit 692dd96

Please sign in to comment.