You can have a look here Gofer it url: 'http://smalltalkhub.com/mc/BenjaminVanRyseghem/DocTest/main'; package: 'DocTest'; load. Then you can have a look at the test to see how it works :) Basically MockCommentWithValidTests is a class with a comment containing valid test then you can do (DocTest testClass: MockCommentWithValidTests) run It will run the test, and notify if something is wrong Ben On Jan 22, 2013, at 9:49 PM, Denis Kudriashov wrote:
2013/1/22 Sean P. DeNigris <sean@clipperadams.com> Benjamin Van Ryseghem-2 wrote
I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
I've been dreaming about, and doing experiments around, this for quite a while... could be so much better in st because we can create custom UI tools instead of text files...
I dream about it too :)). I remember we talk about this in Gent. But what experiments are you talk about? How I can try it? I think BDD programming can be much better and simpler with smalltalk because we are not limited with text files and code syntax. We can work with objects and present it with any way we want. With classic TDD we model system specs with test methods which are very restricted way for building readable and reusable specs of system. And I think we mix here few concepts: how to validate (run) specs, how to persist specs and what specs actualy is. And last item is what we should reimplement from scrach independently from others (we should forgot about others for the moment). BDD exactly about it. But nonsmalltalk world continue mix concepts because text files and code syntax is only way to persist and build system specs there. They was make just good refactoring of TDD approach which is very nice but I'm sure we can do better :)