Skip to content

Instantly share code, notes, and snippets.

@talentdeficit
Created October 18, 2017 19:42
Show Gist options
  • Save talentdeficit/aec20c2ebb8202a867cb0c4257256c41 to your computer and use it in GitHub Desktop.
Save talentdeficit/aec20c2ebb8202a867cb0c4257256c41 to your computer and use it in GitHub Desktop.
defmodule MyApp.Db.Tests do
use MyApp.Db.Case, async: true
## tests go here
end
ExUnit.start
defmodule MyApp.Db.Case do
use ExUnit.CaseTemplate
setup do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(MyApp.Db)
end
end
Ecto.Adapters.SQL.Sandbox.mode(MyApp.Db, :manual)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment