Add example for List.wrap(nil)
This better covers the cases of List.wrap
This commit is contained in:
@@ -63,6 +63,10 @@ defmodule Lists do
|
|||||||
assert List.wrap("value") == ___
|
assert List.wrap("value") == ___
|
||||||
end
|
end
|
||||||
|
|
||||||
|
koan "Wrapping nothing produces a list of nothing" do
|
||||||
|
assert List.wrap(nil) == ___
|
||||||
|
end
|
||||||
|
|
||||||
koan "When there is already a list do not wrap it again" do
|
koan "When there is already a list do not wrap it again" do
|
||||||
assert List.wrap(["value"]) == ___
|
assert List.wrap(["value"]) == ___
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ defmodule ListsTests do
|
|||||||
[1, 2, 3, 4],
|
[1, 2, 3, 4],
|
||||||
{1, 2, 3},
|
{1, 2, 3},
|
||||||
["value"],
|
["value"],
|
||||||
|
[],
|
||||||
["value"],
|
["value"],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user