test_cleanup.exs
· 203 B · Elixir
Raw
describe "my awesome testing describe" do
setup do
starting_value = Application.get_env(:cool, :beans)
on_exit(fn ->
Application.put_env(:cool, :beans, starting_value)
end)
end
end
| 1 | describe "my awesome testing describe" do |
| 2 | setup do |
| 3 | starting_value = Application.get_env(:cool, :beans) |
| 4 | |
| 5 | on_exit(fn -> |
| 6 | Application.put_env(:cool, :beans, starting_value) |
| 7 | end) |
| 8 | end |
| 9 | end |