pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Push up driver should handle three cases

Open Ducasse opened this issue 3 months ago • 2 comments

Right now if you push a method in the superclass and the method was defined up in the hierarchy, you get a pop up asking you if you want to pusho down the superclass method to siblings. If you say no nothing happen while you may want to push your method in the superclass so that all the siblings and the original class gets the same method.

Example

TestCase >> setUp do root
       A
               B >> setUp do it X
               C

pushing B >> setUp could lead to

TestCase >> setUp do root
       A >> setUp do it X
               B 
               C >> setUp do root

This first solution is the best to garantee behavior

Now as a programmer we need to have

TestCase >> setUp do root
       A >> setUp do it X
               B 
               C

So may be we should have a PushUp transformation that does not care about siblings.

Ducasse avatar Nov 20 '25 20:11 Ducasse

@balsa-sarenac what do you think?

Ducasse avatar Nov 20 '25 20:11 Ducasse

Yes, I agree. We might already have issue on this, but we should support this. The driver needs another option that can

balsa-sarenac avatar Nov 21 '25 12:11 balsa-sarenac