Skip to content

Instantly share code, notes, and snippets.

@bcardarella
Created January 27, 2016 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcardarella/55babcb702cc41694e3f to your computer and use it in GitHub Desktop.
Save bcardarella/55babcb702cc41694e3f to your computer and use it in GitHub Desktop.
defmodule MyModule do
defmacro __using__(_) do
quote do
@before_compile MyModule
end
end
defmacro __before_compile__(_) do
quote do
setup do
IO.puts "in the setup"
end
end
end
end
defmodule MyTest do
use ExUnite.Case
use MyModule
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment