Skip to content

Commit 3e9cfc5

Browse files
author
Yves Orton
committed
more tweaks to be squashed down - in_tmp is overkill, and use refute
1 parent cc21e1b commit 3e9cfc5

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

lib/mix/test/mix/utils_test.exs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,14 @@ defmodule Mix.UtilsTest do
217217
end
218218

219219
test "verify that writing to STDOUT works as expected" do
220-
in_tmp("make sure we don't actually write to disk", fn ->
221-
output =
222-
ExUnit.CaptureIO.capture_io(fn ->
223-
Mix.Utils.write_according_to_opts!("the_file.txt", ["some text"], output: "-")
224-
end)
220+
output =
221+
ExUnit.CaptureIO.capture_io(fn ->
222+
Mix.Utils.write_according_to_opts!("the_file.txt", ["some text"], output: "-")
223+
end)
225224

226-
assert output == "some text"
225+
assert output == "some text"
227226

228-
assert File.exists?("the_file.txt") == false
229-
end)
227+
refute File.exists?("the_file.txt")
230228
end
231229
end
232230

0 commit comments

Comments
 (0)