Skip to content

Commit bb9ab19

Browse files
committed
Localize user-facing error text in assertIncludes:
1 parent 43141db commit bb9ab19

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

source/Sagan-Core/RepositoryBehavior.class.st

+7-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ RepositoryBehavior >> assertBoundariesAreValidFrom: aStartingPosition upTo: aMax
4343
{ #category : 'private - preconditions' }
4444
RepositoryBehavior >> assertIncludes: inMemoryObject [
4545

46-
AssertionChecker
47-
enforce: [ ( self countMatching: [ :objectInRepository :criteria | criteria does: objectInRepository equal: inMemoryObject ] ) strictlyPositive ]
48-
because: [ '<1p> was not found.' expandMacrosWith: inMemoryObject ]
49-
raising: ObjectNotFound
46+
AssertionChecker
47+
enforce: [
48+
( self countMatching: [ :objectInRepository :criteria |
49+
criteria does: objectInRepository equal: inMemoryObject ] ) strictlyPositive
50+
]
51+
because: [ '{1} was not found.' localizedWithAll: { inMemoryObject printString } ]
52+
raising: ObjectNotFound
5053
]
5154

5255
{ #category : 'private - preconditions' }

0 commit comments

Comments
 (0)