On Feb 10, 2013, at 9:39 PM, Stefan Marr <smalltalk@stefan-marr.de> wrote:
While wondering how to simply support Pharo 1.4 and Pharo 2.0 at the same time, I noticed something I didn't think about before.
Phexample does use the following code to identify what a test method is:
each numArgs isZero and: [ (each asLowercase includesSubString: 'should')
Note that it is #includesSubString, in contrast to #beginsWith:. Is that on purpose? Is this feature supposed to be used?
I have no idea. I was confused by the fact that should beTrue returns nil and other. And I was trapped with the interaction with Job progress.
That gives rise to example-driven testing ala:
Foo >> #barShouldBeSomething
So far, I tried to avoid that, and make examples that are really focused on one specific subject, which is represented by the class name.
Any opinions on that?
Best regards Stefan
PS: It is also inconsistent with Phexample's own #isTest: implementation, which uses #beginsWith:
-- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525