tddef

tddef is a tool meant to help you do test driven development.

tddef checks that your code is covered by tests. If it's not compilation will fail with a helpful message guiding you in the TDD process.

Usage

Example

TODO: Ascii gif

Details

tddef works by wrapping the def keyword in Elixir. Before allowing you to define your function it will check that you have a test for it.

This little helper started as a project to learn more about macros in Elixir.

Installation

tddef is not yet on hex!

If available in Hex, the package can be installed by adding tddef to your list of dependencies in mix.exs:

def deps do
  [
    {:tddef, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/tddef.