Closed koendehondt closed 4 months ago
The status reads:
Looking for some source of already written tests - may be the launcher so that people can have a look
@Ducasse Shouldn't we simply use the example that is in the chapter already, instead of using other code?
The test code is in the chapter, but the presenter class is not. The code is in Chapters/TestingInSpec/Spec2-Testing.st
.
I do not remember :) I probably thought that we do not have enough examples. For the presenter class I have no idea where I put it. And worse I have no idea what is this ClassVisualizerPresenter. I do not think that I wrote it. I do not understand its purpose (can you check the author using some VS magic?).
After re-reading the chapter "Testing Spec applications", I think the example with ClassVisualizerPresenter
is strange. It has two functionalities:
These two functionalities have no relation. Very strange. Very confusing.
I wonder whether it wouldn't be better to remove all the test code and move the section "Testing your application UI" from the chapter "Most of Spec in on example" to this chapter.
I do not remember :) I probably thought that we do not have enough examples. For the presenter class I have no idea where I put it. And worse I have no idea what is this ClassVisualizerPresenter. I do not think that I wrote it. I do not understand its purpose (can you check the author using some VS magic?).
You added it 😁. See https://github.com/SquareBracketAssociates/BuildingApplicationWithSpec2/commit/f1d5ec12406399bde2e9ae085a10ec00e852901f. The code was added by Christophe in https://github.com/SquareBracketAssociates/BuildingApplicationWithSpec2/commit/4ff405af847fff2cbc9000e18b3c0ef64efd7dfb.
To me this example is a non sense. I do not understand why I would color a class. I would keep the test in the Most... because people should write tests. Now we could just design a little example that is better than this one :)
@Ducasse I have written another little example that has a list and some buttons. You find the code in https://github.com/SquareBracketAssociates/CodeOfSpec20Book/blob/master/src/CodeOfSpec20Book/ColorChooser.class.st Here is a screenshot:
I am adapting the text. I expect to finish tomorrow. I will assign you as reviewer when I am done.