Skip to content

Commit bd6d4f2

Browse files
Remove usage of Mix.Config
1 parent 233e1fe commit bd6d4f2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/config_test.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
defmodule Exq.ConfigTest do
22
use ExUnit.Case
3-
require Mix.Config
43

54
setup_all do
65
ExqTestUtil.reset_config()
@@ -16,7 +15,7 @@ defmodule Exq.ConfigTest do
1615
end)
1716
end
1817

19-
test "Mix.Config should change the host." do
18+
test "Application.put should change the host." do
2019
assert Exq.Support.Config.get(:host) != "127.1.1.1"
2120
Application.put_all_env([exq: [host: "127.1.1.1"]], persistent: true)
2221
assert Exq.Support.Config.get(:host) == "127.1.1.1"

test/test_helper.exs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ defmodule ExqTestUtil do
2020
@long_timeout 100
2121

2222
alias Exq.Support.Coercion
23-
alias Exq.Support.Config
23+
alias Exq.Support
24+
alias Config.Reader
2425

2526
def redis_host do
26-
Config.get(:host)
27+
Support.Config.get(:host)
2728
end
2829

2930
def redis_port do
3031
:port
31-
|> Config.get()
32+
|> Support.Config.get()
3233
|> Coercion.to_integer()
3334
end
3435

@@ -84,7 +85,7 @@ defmodule ExqTestUtil do
8485
end
8586

8687
def reset_config do
87-
config = Mix.Config.read!(Path.join([Path.dirname(__DIR__), "config", "config.exs"]))
88+
config = Reader.read!(Path.join([Path.dirname(__DIR__), "config", "config.exs"]))
8889
Application.put_all_env(config, persistent: true)
8990
end
9091

0 commit comments

Comments
 (0)