Created
January 27, 2016 20:40
-
-
Save bcardarella/55babcb702cc41694e3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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