Skip to content

Commit

Permalink
Merge pull request #45 from smartcitiesdata/divo_case
Browse files Browse the repository at this point in the history
Add Divo.Case
  • Loading branch information
jakeprem authored Sep 25, 2019
2 parents 6724e2b + c11a53a commit 3839457
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
16 changes: 16 additions & 0 deletions lib/divo/case.ex
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions test/integration_test.exs
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 3839457

Please sign in to comment.