Le 20 avr. 2015 à 18:23, Sean P. DeNigris a écrit :

> Sean P. DeNigris wrote
>> refactor so that all those places use one implementation somewhere.
> 
> In fact, searching the sources for "beginsWith: 'test'", the logic is
> duplicated quite a bit. And someone even snuck your proposed change into
> CompiledMethod>>#isTestMethod, so now we already have two conflicting
> concepts of what a test selector is in Core.

In fact, I already did the changes in an image (but not published, I wait for 
feedback) and I also noticed the duplicated logic.
Monty also pointed me to take care of this problem: 
https://pharo.fogbugz.com/f/cases/12280/Nautilus-treats-should-messages-as-tests-and-tries-to-run-them-TestRunner-doesn-t.

What I did is really simple:
In TestCase Class,
add 

update #testSelectors and #methodChanged: to use #isTestSelector:
update shouldInheritSelectors to fix a wrong behavior
In ClassTestCase, update selectorsTested to use  #isTestSelector:
Update Nautilus extension method CompiledMethod>>isTestMethod to use 
TestCase>>#isTestSelector:

I will add a slice for that but I'm not sure if it is a good idea to include 
tests beginning with deny.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to