diff --git a/lib/divo/case.ex b/lib/divo/case.ex new file mode 100644 index 0000000..11a19f2 --- /dev/null +++ b/lib/divo/case.ex @@ -0,0 +1,16 @@ +defmodule Divo.Case do + @moduledoc """ + Can be used in place of Divo to also include ExUnit.Case. + Opts will still be passed to Divo as normal, and the async + opt will be passed only to ExUnit.Case. + """ + + defmacro __using__(opts \\ []) do + {async, opts} = Keyword.pop(opts, :async, false) + + quote do + use ExUnit.Case, async: unquote(async) + use Divo, unquote(opts) + end + end +end diff --git a/test/integration_test.exs b/test/integration_test.exs index 73bf6a4..e3f2664 100644 --- a/test/integration_test.exs +++ b/test/integration_test.exs @@ -1,6 +1,5 @@ defmodule IntegrationAllTest do - use ExUnit.Case - use Divo + use Divo.Case test "the full dependency stack is stood up" do {containers, _} = System.cmd("docker", ["ps", "-a"], stderr_to_stdout: true)