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 ]
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
nobody = %Person{}
assert nobody.age == :__