From 5bbe3a49bdf9573d70c934ed60ea3733bbb9e159 Mon Sep 17 00:00:00 2001 From: Nyan11 Date: Tue, 10 Oct 2023 10:13:46 +0200 Subject: [PATCH] Remove not existing method for Pharo 11 --- src/Pyramid-Bloc/PyramidSaveModelVerifier.class.st | 10 +++++++--- src/Pyramid-Tests/PyramidSavingServiceTest.class.st | 9 +++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Pyramid-Bloc/PyramidSaveModelVerifier.class.st b/src/Pyramid-Bloc/PyramidSaveModelVerifier.class.st index 6cfb1071..babdd801 100644 --- a/src/Pyramid-Bloc/PyramidSaveModelVerifier.class.st +++ b/src/Pyramid-Bloc/PyramidSaveModelVerifier.class.st @@ -35,9 +35,13 @@ PyramidSaveModelVerifier class >> classPackageIsEqual [ class package name = model savingPackageName ifTrue: [ true ] ifFalse: [ - class packageTag ifNil: [ false ] ifNotNil: [ - class package name , '-' , class packageTag name - = model savingPackageName ] ] ] + class package classTags + detect: [ :tag | tag includesClass: class ] + ifFound: [ :tag | + class package name , '-' , tag name + = model savingPackageName ] + ifNone: [ false ]. + ] ] ifAbsent: [ true ] ]; showBlock: [ :view | view showClassPackageIsNotEqualError ]; yourself diff --git a/src/Pyramid-Tests/PyramidSavingServiceTest.class.st b/src/Pyramid-Tests/PyramidSavingServiceTest.class.st index 6a61565b..29a3d5ad 100644 --- a/src/Pyramid-Tests/PyramidSavingServiceTest.class.st +++ b/src/Pyramid-Tests/PyramidSavingServiceTest.class.st @@ -111,12 +111,17 @@ PyramidSavingServiceTest >> testCanSave [ model savingClassName: self savingClass name. model savingMethodName: 'aPyramidSavingMethod'. model savingPackageName: - self savingClass package name , '-' , self savingClass packageTag name. + self savingClass package name , '-cases-plugin-save'. self assert: self savingService canSave. model savingClassName: self savingClass name. model savingMethodName: 'aPyramidSavingMethod'. - model savingPackageName: self savingClass package name , 'notTheSame'. + model savingPackageName: self savingClass package name , 'notTheSamePackage'. + self deny: self savingService canSave. + +model savingClassName: self savingClass name. + model savingMethodName: 'aPyramidSavingMethod'. + model savingPackageName: self savingClass package name , '-notTheSameTag'. self deny: self savingService canSave ]