Properly unwrap the koan body the keyword list argument

It's a bummer that this isn't tested. I spent just a couple minutes
trying to come up with where to put the test, but gave up for time's
sake.

See https://github.com/elixirkoans/elixir-koans/issues/151 for more
information and screenshots.
This commit is contained in:
Jay Hayes
2016-12-23 08:45:48 -06:00
parent 6284b1de49
commit fbf1e139f0

View File

@@ -3,7 +3,7 @@ defmodule Koans do
Regex.match?(~r/([A-Z]|\.\.\.).+/, name)
end
defmacro koan(name, body) do
defmacro koan(name, do: body) do
if not valid_name(name) do
raise "Name does not start with a capital letter: #{name}"
end