Packages

Behaviour driven development for ExUnit with product management friendly readable scenarios.

Current section

Files

Jump to
behave_bdd lib formatter.ex
Raw

lib/formatter.ex

defmodule Behave.Formatter do
use GenServer
alias Behave.Formatter.Store
@impl true
def init(_opts) do
{:ok, nil}
end
@impl true
def handle_cast({:suite_finished, _suite}, config) do
Store.create_report()
{:noreply, config}
end
@impl true
def handle_cast({:test_finished, test}, config) do
Store.update_status(test)
{:noreply, config}
end
@impl true
def handle_cast(_, config), do: {:noreply, config}
end