I am starting to learn Smalltalk, using Pharo 5. I am now following a tutorial from the squeak guys to get some proper grip on the syntax, etc.
I am in the beginning, I have only two classes (a class BlankCell and a BlanCellTestCase class for the unit test). The Blankcell has some messages implemented already, I am at the very end of section 1.9.
The beahavior is well implemented, because on the playground:
| cell exit |
cell := BlankCell new.
exit := cell exitSideFor: #north.
exit = #south
"the last statement properly returns a true or false"
On the testcase there are three tests, only one fails (related to the exitSide):
testCellExitSides
"Test the exit sides."
| cell exit |
cell := BlankCell new.
exit := cell exitSideFor: #north.
self assert: [ exit = #south ].
exit := cell exitSideFor: #east.
self assert: [ exit = #west ].
exit := cell exitSideFor: #south.
self assert: [ exit = #north ].
exit := cell exitSideFor: #west.
self assert: [ exit = #east ].
The error message is
MessageNotUnderstood:BlockClosure>>ifFalse:
The doesNotUnderstand
message is sent an argument pointing to the sentence [ exit = #south ]
Does anyone understand what may be going on here?