aboutsummaryrefslogtreecommitdiff
path: root/shard/test/test_helper.exs
diff options
context:
space:
mode:
Diffstat (limited to 'shard/test/test_helper.exs')
-rw-r--r--shard/test/test_helper.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/shard/test/test_helper.exs b/shard/test/test_helper.exs
new file mode 100644
index 0000000..e5b6600
--- /dev/null
+++ b/shard/test/test_helper.exs
@@ -0,0 +1,8 @@
+ExUnit.start()
+
+case :gen_tcp.connect('localhost', 4045, []) do
+ {:ok, socket} ->
+ :gen_tcp.close(socket)
+ {:error, _reason} ->
+ Mix.raise "Please have another instance of Shard running at 127.0.0.1:4045, it can be launched with the command: PORT=4045 iex -S mix"
+end