Skip to content

Commit

Permalink
Fix not existing method for Pharo 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyan11 committed Oct 10, 2023
1 parent a8f79b8 commit edade44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 7 additions & 3 deletions src/Pyramid-Bloc/PyramidSaveModelVerifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ PyramidSaveModelVerifier class >> classPackageIsEqual [
verifyBlock: [ :model |
self class environment
at: model savingClassName asSymbol
ifPresent: [ :class |
"
ifPresent: [ :class | "
Model = class package >> OK
Model = class package '-' class packageTag >> OK
KO"
class packageName = model savingPackageName ifTrue: [ true ] ifFalse: [ class packageTag ifNil: [false] ifNotNil: [ (class packageName ,'-', class packageTagName) = model savingPackageName ] ] ]
class package name = model savingPackageName
ifTrue: [ true ]
ifFalse: [
class packageTag ifNil: [ false ] ifNotNil: [
class package name , '-' , class packageTag name
= model savingPackageName ] ] ]
ifAbsent: [ true ] ];
showBlock: [ :view | view showClassPackageIsNotEqualError ];
yourself
Expand Down
10 changes: 6 additions & 4 deletions src/Pyramid-Tests/PyramidSavingServiceTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ PyramidSavingServiceTest >> testCanSave [
model savingMethodName: 'aPyramidSavingMethod'.
model savingPackageName: self savingClass package name.
self assert: self savingService canSave.

self assert: self savingClass packageTag isNotNil.
model savingClassName: self savingClass name.
model savingMethodName: 'aPyramidSavingMethod'.
model savingPackageName: self savingClass packageName, '-', self savingClass packageTagName.
model savingPackageName:
self savingClass package name , '-' , self savingClass packageTag name.
self assert: self savingService canSave.

model savingClassName: self savingClass name.
Expand Down Expand Up @@ -146,7 +147,7 @@ PyramidSavingServiceTest >> testSave [
model := PyramidSaveModel new.
model projectModel: PyramidProjectModel new.
model savingClassName: self savingClass name.
model savingPackageName: self savingClass packageName.
model savingPackageName: self savingClass package name.
self savingService saveModel: model.

self deny: (self savingClass classSide canUnderstand: #classMethod).
Expand All @@ -173,7 +174,8 @@ PyramidSavingServiceTest >> testSave [
(self savingClass instanceSide canUnderstand: #instanceMethod).

model onClass.
model savingPackageName: self savingClass packageName , '-' , self savingClass packageTagName.
model savingPackageName:
self savingClass package name , '-' , self savingClass packageTag name.
model savingMethodName: 'packageWithTag'.
self savingService save.
self assert:
Expand Down

0 comments on commit edade44

Please sign in to comment.