The record is the text of the repair. The Results table is the last run of the row.
UndeclaredVariableRead: GitlabApi).GithubUsersTest are copies of tests of the GitLab
project and make a GitlabApi. The baseline rightly does not load that
class. A fourth test calls one of the three.fixes/evref-bl-github-pharo-api.st uses GithubApi. The
tests replace the HTTP client with a mock, so no request leaves the
machine.Load the package into a Pharo 14 image (build 791) with the load expression of the test run, file in the fixes file of the row if there is one, and run the test classes of the package.
"row 104"
Metacello new baseline: 'GithubAPI'; repository: 'github://Evref-BL/Github-Pharo-API:main/src'; onConflict: [:e | e useIncoming]; load: #('default').Last result of the package run (stock Cog and iospharo on the same image).
| Row | Label | Load | Stock Cog | iospharo VM |
|---|---|---|---|---|
| 104 | evref-bl-github-pharo-api | ok | tests=50 P=50 F=0 E=0 S=0 T=0 X=0 | tests=50 P=50 F=0 E=0 S=0 T=0 X=0 |
"Evref-BL/Github-Pharo-API: GithubUsersTest>>testGet, testGetUnknowUsers and testGetUserId were copied from the tests of Evref-BL/Gitlab-Pharo-API and still build their API object with 'GitlabApi new'. The Github baseline does not load GitlabApi (and GitlabApi has no #users that fits). The class that the Github package has is GithubApi (users answers GithubUsers). The sibling tests (GithubOrganizationsTest and others) use GithubApi with the same stubbed ZnClient, and they pass. testGetUsername only sends testGet, so the same repair fixes that test. The repair replaces the class name in each of the three test methods. No request leaves the image: ZnClient>>get is stubbed by Mocketry in each test." Smalltalk globals at: #PkgFixRewrite put: [ :clsName :sel :oldText :newText | | cls | cls := resolve value: clsName. (cls notNil and: [ cls includesSelector: sel ]) ifTrue: [ fix value: clsName value: sel value: [ :source | source includesSubstring: oldText ] value: ((cls >> sel) sourceCode copyReplaceAll: oldText with: newText) ] ifFalse: [ fix value: clsName value: sel value: [ :source | false ] value: '' ] ]. #(testGet testGetUnknowUsers testGetUserId) do: [ :selector | (Smalltalk globals at: #PkgFixRewrite) value: #GithubUsersTest value: selector value: 'GitlabApi' value: 'GithubApi' ]. Smalltalk globals removeKey: #PkgFixRewrite ifAbsent: [ nil ].
State of 2026-11-20. Made from the test records of the iospharo project (a second Pharo VM). The fixes are proposals for review.