diff --git a/lib/koans/20_comprehensions.ex b/lib/koans/20_comprehensions.ex index 35eeccb3..67acd18c 100644 --- a/lib/koans/20_comprehensions.ex +++ b/lib/koans/20_comprehensions.ex @@ -23,11 +23,4 @@ defmodule Comprehensions do koan "Use a filter to reduce your work" do assert (for n <- [1, 2, 3, 4, 5, 6], n > 3, do: n) == ___ end - - koan "Add the result of a comprehension to an existing collection" do - collection = ["Apple Pie"] - collection = for x <- ["Pecan", "Pumpkin"], into: collection, do: "#{x} Pie" - assert collection == ___ - end - end diff --git a/test/koans/comprehensions_koans_test.exs b/test/koans/comprehensions_koans_test.exs index bcf74982..53d2c257 100644 --- a/test/koans/comprehensions_koans_test.exs +++ b/test/koans/comprehensions_koans_test.exs @@ -9,7 +9,6 @@ defmodule ComprehensionsTests do ["Hello World", "Apple Pie"], ["little dogs", "little cats", "big dogs", "big cats"], [4, 5, 6], - ["Apple Pie", "Pecan Pie", "Pumpkin Pie"], ] test_all(Comprehensions, answers) diff --git a/test/test_helper.exs b/test/test_helper.exs index 56d98f43..3e92a2de 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -15,8 +15,8 @@ defmodule TestHarness do koans_count = length(koans) answer_count = length(answers) - if length(koans) > length(answers) do - raise "Answer missing for #{module}. #{koans_count} koans, but only #{answer_count} answers." + if length(koans) != length(answers) do + raise "Mismatched number of answers for module #{module}. #{koans_count} koans, but #{answer_count} answers." else koans end