Skip to content

Commit

Permalink
Add support for passing async flag to ExUnit.Case
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeprem committed Sep 25, 2019
1 parent 52556be commit c11a53a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/divo/case.ex
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
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.
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
use ExUnit.Case, async: unquote(async)
use Divo, unquote(opts)
end
end
Expand Down

0 comments on commit c11a53a

Please sign in to comment.