Created
August 17, 2016 16:10
-
-
Save zoldar/26d58e93d7f330e71a9721ebbe25c87a 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 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