Created
April 28, 2015 15:41
-
-
Save pmarreck/5be9c3f934a1c65e441c to your computer and use it in GitHub Desktop.
elixir argument error...
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
test "single digits" do | |
%{zero: 0, one: 1, two: 2, three: 3, four: 4, five: 5, six: 6, seven: 7, eight: 8, nine: 9} | |
|> | |
Enum.each(fn {word, num} -> | |
IO.puts "asserting #{word} == #{num}" | |
assert to_string(word) == NumbersToWords.parse(num) | |
end) | |
end | |
# I keep getting an argument error as it ends up trying to do :erlang.integer_to_binary("8") | |
# instead of :erlang.integer_to_binary(8)... Probably due to how the "assert" macro works... How to fix? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment