Skip to content

Instantly share code, notes, and snippets.

@zoldar
Created August 17, 2016 16:10
Show Gist options
  • Save zoldar/26d58e93d7f330e71a9721ebbe25c87a to your computer and use it in GitHub Desktop.
Save zoldar/26d58e93d7f330e71a9721ebbe25c87a to your computer and use it in GitHub Desktop.
defmodule Clubbase.AssertionRunner do
def test_assertion(assertion) do
quote do
test unquote(assertion["description"]) do
unquote(assertion["description"]) |> IO.inspect
end
end
end
defmacro test_assertions(assertions_path) do
File.read!(assertions_path)
|> Poison.decode!
|> Enum.map(&test_assertion/1)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment