Skip to content

Commit

Permalink
Corrected test assertion to prevent assuming order of results
Browse files Browse the repository at this point in the history
  • Loading branch information
mtabacman committed Jan 5, 2024
1 parent 6be4a73 commit fa5224b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions source/Sagan-Core-Tests/RepositoryBasedTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ RepositoryBasedTest class >> isAbstract [
RepositoryBasedTest >> assertRepositoryIncludesSilvesterStallone [

self extraterrestrials
withOneMatching: [ :extraterrestrial | extraterrestrial firstName = 'Silvester' ]
do: [ :extraterrestrial | self assert: extraterrestrial lastName equals: 'Stallone' ]
withOneMatching: [ :extraterrestrial |
extraterrestrial firstName = 'Silvester' and: [ extraterrestrial lastName = 'Stallone' ] ]
do: [ :extraterrestrial |
self assert:
( extraterrestrial firstName = 'Silvester' and: [ extraterrestrial lastName = 'Stallone' ] )
]
else: [ self fail ]
]

Expand Down
2 changes: 1 addition & 1 deletion source/Sagan-GemStone/GemStoneRepository.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ GemStoneRepository >> findAllMatching: aCriteriaOrBlock sortedBy: aSortFunction
GemStoneRepository >> initializeCheckingConflictsAccordingTo: aConflictCheckingStrategy [

conflictCheckingStrategy := aConflictCheckingStrategy.
contents := OrderedCollection new
contents := Bag new
]

{ #category : 'private - accessing' }
Expand Down

0 comments on commit fa5224b

Please sign in to comment.