Refernece the Person struct from test harness

This commit is contained in:
Felipe Sere
2016-03-16 21:55:19 +00:00
parent 243a8a07d8
commit e4d1cad6df
2 changed files with 6 additions and 0 deletions

View File

@@ -5,6 +5,11 @@ defmodule Structs do
defstruct [:name, :age ] defstruct [:name, :age ]
end end
koan "structs are defined and named after a module" do
person = %Person{}
assert person == :__
end
koan "you can access the fields of a struct" do koan "you can access the fields of a struct" do
nobody = %Person{} nobody = %Person{}
assert nobody.age == :__ assert nobody.age == :__

View File

@@ -151,6 +151,7 @@ defmodule KoansHarnessTest do
test "Structs" do test "Structs" do
answers = [ answers = [
%Structs.Person{},
nil, nil,
"Joe", "Joe",
33, 33,