Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion installer/test/mix_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule MixHelper do
import ExUnit.CaptureIO

def tmp_path do
Path.expand("../../tmp", __DIR__)
Path.expand("../tmp", __DIR__)
end

defp random_string(len) do
Expand Down
5 changes: 3 additions & 2 deletions integration_test/test/support/code_generator_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,15 @@ defmodule Phoenix.Integration.CodeGeneratorCase do
def with_installer_tmp(name, opts \\ [], function)
when is_list(opts) and is_function(function, 1) do
autoremove? = Keyword.get(opts, :autoremove?, true)
path = Path.join([installer_tmp_path(), random_string(10), to_string(name)])
base = Path.join([installer_tmp_path(), random_string(10)])
path = Path.join([base, to_string(name)])

try do
File.rm_rf!(path)
File.mkdir_p!(path)
function.(path)
after
if autoremove?, do: File.rm_rf!(path)
if autoremove?, do: File.rm_rf!(base)
end
end

Expand Down
Loading