Testing Elixir: Term not unquoted (page 18)

On page 18, there is the code:

test "success: recognizes #{condition} as a rainy condition" do
  …
end

It is nested within a comprehension and introduces a metaprogramming concept for test generation using code fragments; however, condition is not unquoted in the block. In this case, condition is a binary, so its quoted form is the same as its unquoted form. So the tests run fine but are semantically incorrect, perhaps leading to some potential confusion about why ids needs to be unquoted, but condition does not.

Solution

condition should probably use unquote for the sake of correctness and to prevent any confusion for the reader.