Skip to content

Commit

Permalink
Removed classes and methods from package still needs to be removed fr…
Browse files Browse the repository at this point in the history
…om system. (#633)
  • Loading branch information
Bajger authored May 24, 2024
1 parent 73f0019 commit 65feb8a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dev/src/ExercismTools/ExercismExercise.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,17 @@ ExercismExercise >> printOn: aStream [
ExercismExercise >> removeDefinedSolutionClassesAndExtensionMethods [
"Defined Solution classes with implemented solution to be removed - utilized by TestRunner before importing student solution. DO NOT ERASE SYSTEM CLASSES. Only extension methods of them."

|exercisePackage|
|exercisePackage methodsToRemove|
exercisePackage := self exercisePackageContainer.
self definedSolutionClasses do: [:aClass | exercisePackage removeClassNamed: aClass name].
self definedSolutionClasses do: [:aClass |
exercisePackage removeClassNamed: aClass name.
aClass removeFromSystem
].

"remove extension methods as well"
exercisePackage removeMethods: exercisePackage extensionMethods.
methodsToRemove := exercisePackage extensionMethods.
exercisePackage removeMethods: methodsToRemove.
methodsToRemove do: #removeFromSystem

]

Expand Down

0 comments on commit 65feb8a

Please sign in to comment.