You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a script I did yesterday that is cool IMO:
r :=RBParseTreeRewriternew.
r replace:'`@receiver isEmpty should beTrue'with:'self assertEmpty: `@receiver'.
r replace:'`@receiver should beTrue'with:'self assert: `@receiver'.
r replace:'`@receiver isEmpty should beFalse'with:'self denyEmpty: `@receiver'.
r replace:'`@receiver should beFalse'with:'self deny: `@receiver'.
r replace:'`@receiver should = `@statement1'with:'self assert: `@receiver equals: `@statement1'.
r replace:'`@receiver should not = `@statement1'with:'self deny: `@receiver equals: `@statement1'.
r replace:'`@receiver should include: `@statement1'with:'self assert: (`@receiver includes: `@statement1)'.
r replace:'`@receiver should not include: `@statement1'with:'self deny: (`@receiver includes: `@statement1)'.
r replace:'`@receiver should equal: `@statement1'with:'self assert: `@receiver equals: `@statement1'.
r replace:'`@receiver should beKindOf: `@statement1'with:'self assert: (`@receiver isKindOf: `@statement1)'.
r replace:'`@receiver should beginWith: `@statement1'with:'self assert: (`@receiver beginsWith: `@statement1)'.
r replace:'`@receiver should > `@statement1'with:'self assert: (`@receiver > `@statement1)'.
r replace:'`@receiver should not raise: `@statement1'with:'self shouldnt: `@receiver raise: `@statement1'.
'Fame-Tests-Core' asPackage definedClasses select: [ :e | e inheritsFrom:TestCase ] thenDo: [ :class |
class methods select: [ :m | m selector beginsWith:'test' ] thenDo: [ :m |
n := m parseTree.
r executeTree: n.
classcompile: n formattedCode.
]
]
The text was updated successfully, but these errors were encountered:
Here is a script I did yesterday that is cool IMO:
The text was updated successfully, but these errors were encountered: