ExUnit.Case

ExUnit.Case

Sets up an ExUnit test case.

This module must be used in other modules as a way to configure and prepare them for testing.

When used, it accepts the following options:

  • :async - configure this specific test case to able to run in parallel with other test cases. May be used for performance when this test case does not change any global state. Defaults to false.

This module automatically includes all callbacks defined in ExUnit.Callbacks. See that module’s documentation for more information.

Examples

 defmodule AssertionTest do
   # Use the module
   use ExUnit.Case, async: true

   # The "test" macro is imported by ExUnit.Case
   test "always pass" do
     assert true
   end
 end