cortex v0.6.0 Cortex View Source

Documentation for Cortex.

Features

Cortex runs along side your elixir application.

Reload

Once added to your dependencies, it will startup automatically when you run iex -S mix.

  $ iex -S mix

A file-watcher will keep an eye on any changes made in your app's lib and test directories, recompiling the relevant files as changes are made.

Compile Failures

Changes to a file that result in a failed compile are pretty annoying to deal with. Cortex will present compiler errors (with the file and line number!) until a clean compile is again possible.

Test Runner

When your app is run in the :test env, Cortex will act as a test runner.

  $ MIX_ENV=test iex -S mix

Any change to a file in lib will then run tests for the corresponding file in test, and any change to a test file will re-run that file's tests.

Link to this section Summary

Functions

Run all stages in the current Cortex pipeline on all files (ie, recompile all files, run all tests, etc.).

Set the current focus for all Cortex stages to which it applies.

Clear the focus for all Cortex stages.

Link to this section Functions

Run all stages in the current Cortex pipeline on all files (ie, recompile all files, run all tests, etc.).

Set the current focus for all Cortex stages to which it applies.

Allowed arguments are:

  • a Regex, which will filter to tests whose full test name matches that regular expression
  • a string, which will compile as a regular expression and behave like the above regular expression
  • an integer, which will filter by line number for tests
  • a keyword, which will pass through to ExUnit.configure/1 unchanged

Clear the focus for all Cortex stages.