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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user