From e64394fbaa484db285d900b515cc5f5d983b846a Mon Sep 17 00:00:00 2001 From: Tom Gurion Date: Sat, 22 Apr 2017 22:57:52 +0100 Subject: [PATCH] Add nil example to the atoms koans --- lib/koans/05_atoms.ex | 5 +++++ test/koans/atoms_koans_test.exs | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/koans/05_atoms.ex b/lib/koans/05_atoms.ex index f6b56bb..27d6cfb 100644 --- a/lib/koans/05_atoms.ex +++ b/lib/koans/05_atoms.ex @@ -14,4 +14,9 @@ defmodule Atoms do assert :true == ___ assert :false == ___ end + + koan "Like booleans, the nil value is also an atom" do + assert is_atom(nil) == ___ + assert :nil == ___ + end end diff --git a/test/koans/atoms_koans_test.exs b/test/koans/atoms_koans_test.exs index 794a81e..37bbcdc 100644 --- a/test/koans/atoms_koans_test.exs +++ b/test/koans/atoms_koans_test.exs @@ -6,6 +6,7 @@ defmodule AtomsTests do answers = [ :human, {:multiple, [true, true, true, false]}, + {:multiple, [true, nil]} ] test_all(Atoms, answers)