I'm using ExUnit for testing my Elixir app, which is a card game.
I find that with every test I write, I start by creating a fresh deck of cards.
test "Do This Crazy Thing do
deck = Deck.create()
[...]
end
test "Do This Other Crazy Unrelated Thing" do
deck = Deck.create()
[...]
end
Is there a way to factor this out so that a new deck can just be created before every test case? I know there's something close to this with setup do [...] end, but I don't think that's the solution for me.
Do I need a different test framework? Do I need to use setup in some way I haven't thought of yet?
-Augie