File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11defmodule 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"
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments