# Smokestack

[![Build Status](](
[![Hippocratic License HL3-FULL](](

Smokestack provides a way to define test factories for your [Ash Resources]( using a convenient DSL:

defmodule MyApp.Factory do
  use Smokestack

  factory Character do
    attribute :name, &Faker.StarWars.character/0
    attribute :affiliation, choose(["Galactic Empire", "Rebel Alliance"])

  factory Character, :trek do
    attribute :name, choose(["J.L. Pipes", "Severn", "Slickback"])
    attribute :affiliation, choose(["Entrepreneur", "Voyager"])

defmodule MyApp.CharacterTest do
  use MyApp.DataCase
  use MyApp.Factory

  test "it can build a character" do
    assert character = insert!(Character)

## Installation

Smokestack is available on [Hex]( you can
add it directly to your `mix.exs`:

def deps do
    {:smokestack, "~> 0.3"},

Documentation for the latest release is available on [HexDocs](

## Github Mirror

This repository is mirrored [on Github](
from it's primary location [on my Forejo instance](
Feel free to raise issues and open PRs on Github.

## License

This software is licensed under the terms of the
[HL3-FULL](, see the `` file included with
this package for the terms.

This license actively proscribes this software being used by and for some
industries, countries and activities. If your usage of this software doesn't
comply with the terms of this license, then [contact me](
with the details of your use-case to organise the purchase of a license - the
cost of which may include a donation to a suitable charity or NGO.