Skip to content

Commit

Permalink
Added PureGitCodeExamples
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvc committed Nov 6, 2024
1 parent ca05d1b commit 67576cc
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions src/GToolkit4Git/PureGitCodeExamples.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Extension { #name : #PureGitCodeExamples }

{ #category : #'*GToolkit4Git' }
PureGitCodeExamples >> exampleGToolkit4GitPackage [
<gtExample>
<noTest>

| repository package |

repository := self exampleGt4Git.

package := repository packages detect: [ :each | each name = 'GToolkit4Git' ].

self assert: package isLoaded.

^ package
]

{ #category : #'*GToolkit4Git' }
PureGitCodeExamples >> exampleGToolkit4GitPackageSnapshot [
<gtExample>
<noTest>

| package snapshot |

package := self exampleGToolkit4GitPackage.

snapshot := package reader snapshot.

self assert: snapshot notNil.

^ snapshot
]

{ #category : #'*GToolkit4Git' }
PureGitCodeExamples >> exampleGt4Git [
<gtExample>
<noTest>

| repository |

repository := PureGitCodeRepository on: (IceRepository repositoryNamed: 'gt4git') location.

self assert: repository exists.

^ repository
]

{ #category : #'*GToolkit4Git' }
PureGitCodeExamples >> exampleMethodVersions [
<gtExample>
<noTest>

| methodVersions |

methodVersions := PureGitMethodVersions with: PureGitRepository >> #hasHead.

self assert: methodVersions versions size >= 3.

^ methodVersions
]

0 comments on commit 67576cc

Please sign in to comment.