Skip to content

Commit 55ecdba

Browse files
author
José Valim
committed
Make test that changes global state sync
1 parent 53f5473 commit 55ecdba

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

lib/elixir/test/elixir/code_test.exs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,6 @@ defmodule CodeTest do
6969
assert Code.require_file(fixture_path("code_sample.exs")) != nil
7070
end
7171

72-
test :path_manipulation do
73-
path = __DIR__
74-
Code.prepend_path path
75-
assert to_char_list(path) in :code.get_path
76-
77-
Code.delete_path path
78-
refute to_char_list(path) in :code.get_path
79-
end
80-
8172
test :file do
8273
assert :filename.absname(__FILE__) == __FILE__
8374
end
@@ -144,3 +135,16 @@ defmodule CodeTest do
144135
refute Code.ensure_compiled?(Unknown.Module)
145136
end
146137
end
138+
139+
defmodule Code.SyncTest do
140+
use ExUnit.Case
141+
142+
test :path_manipulation do
143+
path = Path.join(__DIR__, "fixtures")
144+
Code.prepend_path path
145+
assert to_char_list(path) in :code.get_path
146+
147+
Code.delete_path path
148+
refute to_char_list(path) in :code.get_path
149+
end
150+
end

0 commit comments

Comments
 (0)