Mix.Tasks.Espec

Runs the specs.

This task starts the current application, loads up spec/spec_helper.exs and then requires all files matching the spec/**/_spec.exs pattern in parallel.

A list of files can be given after the task name in order to select the files to compile:

mix espec spec/some/particular/file_spec.exs

In case a single file is being tested, it is possible pass a specific line number:

mix espec spec/some/particular/file_spec.exs:42

Command line options

Configuration

Coverage

The :test_coverage configuration accepts the following options:

By default, a very simple wrapper around OTP’s cover is used as a tool, but it can be overridden as follows:

test_coverage: [tool: CoverModule]

CoverModule can be any module that exports start/2, receiving the compilation path and the test_coverage options as arguments. It must return an anonymous function of zero arity that will be run after the test suite is done or nil.

Source

Summary

parse_file(file)
parse_files(files)
run(args)

Callback implementation for c:Mix.Task.run/1

Functions

parse_file(file)
Source
parse_files(files)
Source
run(args)

Callback implementation for c:Mix.Task.run/1.

Source