Skip to content

Latest commit

 

History

History
54 lines (29 loc) · 1.38 KB

Scratch-Talk.md

File metadata and controls

54 lines (29 loc) · 1.38 KB

Testing in Elixir

There are libraries you can test your Elixir Code with. The official library as we all know is ExUnit Docs.

To Get a basic walk I suggest you look thru the docs.

The TLDR version of this link -

In an application generated with the mix command test files are placed in the test folder.

These file need to end in a *_test.exs file extension this denotes that it's elixir script file.

Like a lot of other libraries ExUnit has a DSL that's goal is to help you specify in plain english the goal of components of your code.

With ExUnit you get these macros.

* For General Setup and organizing your tests

describe setup setup_all

  • These macros do the bulk of the grunt work

test assert

assert_receive capture_io and capture_log

Elixir School Testing

Scripts

This is how you run a script test $> elixir hello_world_test.exs

$> elixir -r **/*_test.exs

This can get boring pretty quickly.

Test Cases

Notes

Check out

Coinbase Hex package & Poison Hex Package