File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -15,19 +15,16 @@ defmodule Terrarium.Providers.LocalTest do
1515 Local . destroy ( sandbox )
1616 end
1717
18- test "creates a sandbox with a custom cwd" do
19- dir = Path . join ( System . tmp_dir! ( ) , "terrarium-test- #{ System . unique_integer ( [ :positive ] ) } " )
20- File . mkdir_p! ( dir )
18+ @ tag :tmp_dir
19+ test "creates a sandbox with a custom cwd" , % { tmp_dir: tmp_dir } do
20+ { :ok , sandbox } = Local . create ( cwd: tmp_dir )
2121
22- { :ok , sandbox } = Local . create ( cwd: dir )
23-
24- assert sandbox . state [ "cwd" ] == dir
22+ assert sandbox . state [ "cwd" ] == tmp_dir
2523 assert sandbox . state [ "temp" ] == false
2624
2725 Local . destroy ( sandbox )
2826 # Custom cwd should not be deleted
29- assert File . dir? ( dir )
30- File . rm_rf! ( dir )
27+ assert File . dir? ( tmp_dir )
3128 end
3229 end
3330
You can’t perform that action at this time.
0 commit comments