forked from Metacello/metacello
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue Metacello#331: additional test cases
- Loading branch information
1 parent
4c6aa3e
commit 2660326
Showing
12 changed files
with
203 additions
and
46 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...edTestCase.class/instance/testIssue331.st → ...dTestCase.class/instance/testIssue331A.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...o-TestsMCB.package/MetacelloScriptingEnsureLoadedTestCase.class/instance/testIssue331B.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
tests | ||
testIssue331B | ||
"https://github.com/dalehenrich/metacello-work/issues/331" | ||
|
||
"Load ExternalRef and verify that registration of External project is a baseline ..." | ||
|
||
| registration spec | | ||
Metacello new | ||
configuration: 'ExternalRef'; | ||
repository: 'dictionary://Metacello_Configuration_Test_Repository'; | ||
get. | ||
Metacello new | ||
configuration: 'ExternalRef'; | ||
version: '0.9.1'; | ||
repository: 'dictionary://Metacello_Configuration_Test_Repository'; | ||
load. | ||
registration := Metacello registrations | ||
detect: [ :each | each projectName = 'External' ]. | ||
spec := registration projectSpec. | ||
self assert: spec versionString = '0.9.1'. | ||
self | ||
assert: | ||
spec project configuration class = (Smalltalk at: #'ConfigurationOfExternal') "diagnostic for this bug" |
28 changes: 28 additions & 0 deletions
28
...o-TestsMCB.package/MetacelloScriptingEnsureLoadedTestCase.class/instance/testIssue331C.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
tests | ||
testIssue331C | ||
"https://github.com/dalehenrich/metacello-work/issues/331" | ||
|
||
"Load ExternalRef and verify that registration of External project is a baseline ..." | ||
|
||
| registration spec | | ||
Gofer new | ||
version: 'ConfigurationOfExternal-dkh.1'; | ||
version: 'ConfigurationOfExternalRef-dkh.1'; | ||
repository: externalRepository; | ||
load. | ||
Metacello new | ||
configuration: 'ExternalRef'; | ||
repository: 'dictionary://Metacello_Configuration_Test_Repository'; | ||
get. | ||
Metacello new | ||
configuration: 'ExternalRef'; | ||
version: '0.9.1'; | ||
repository: 'dictionary://Metacello_Configuration_Test_Repository'; | ||
load. "should force ConfigurationOfExternal-dkh.2 to be loaded" | ||
registration := Metacello registrations | ||
detect: [ :each | each projectName = 'External' ]. | ||
spec := registration projectSpec. | ||
self assert: spec versionString = '0.9.1'. | ||
self | ||
assert: | ||
spec project configuration class = (Smalltalk at: #'ConfigurationOfExternal') "diagnostic for this bug" |
24 changes: 24 additions & 0 deletions
24
...o-TestsMCB.package/MetacelloScriptingEnsureLoadedTestCase.class/instance/testIssue331D.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
tests | ||
testIssue331D | ||
"https://github.com/dalehenrich/metacello-work/issues/331" | ||
|
||
"Load ExternalRef and verify that registration of External project is a baseline ..." | ||
|
||
Gofer new | ||
version: 'ConfigurationOfExternal-dkh.1'; | ||
version: 'ConfigurationOfExternalRef-dkh.1'; | ||
repository: externalRepository; | ||
load. | ||
Metacello new | ||
configuration: 'ExternalRef'; | ||
repository: 'dictionary://Metacello_Configuration_Test_Repository'; | ||
get. | ||
self | ||
should: [ | ||
"Referencing a non-existent version in ConfigurationOfExternal" | ||
Metacello new | ||
configuration: 'ExternalRef'; | ||
version: '0.9.2'; | ||
repository: 'dictionary://Metacello_Configuration_Test_Repository'; | ||
load ] | ||
raise: MetacelloProjectSpecLoadError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
...sources.package/MetacelloScriptingResource.class/instance/configurationExternalRef092..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
baseline pragma - github reference | ||
configurationExternalRef092: spec | ||
<version: '0.9.2'> | ||
spec | ||
for: #'common' | ||
do: [ | ||
spec blessing: #'version'. | ||
spec | ||
description: 'MetacelloScriptingResource>>configurationExternalRef092:'. | ||
spec | ||
project: 'External' | ||
with: [ | ||
"ConfigurationOfExternal 0.9.2 should not exist" | ||
spec | ||
className: 'ConfigurationOfExternal'; | ||
version: '0.9.2'; | ||
repository: 'dictionary://Metacello_Configuration_Test_Repository' ] ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...es.package/MetacelloScriptingResource.class/instance/setUpConfigurationExternalRefdkh1.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
baseline pragma - github reference | ||
setUpConfigurationExternalRefdkh1 | ||
"self reset" | ||
|
||
| reference className definitionArray versionInfo | | ||
reference := GoferVersionReference name: 'ConfigurationOfExternalRef-dkh.1'. | ||
className := #'ConfigurationOfExternalRef'. | ||
definitionArray := {(MCOrganizationDefinition | ||
categories: (Array with: reference packageName asSymbol)). | ||
(MCClassDefinition | ||
name: className | ||
superclassName: #'ConfigurationOf' | ||
category: reference packageName | ||
instVarNames: #() | ||
comment: ''). | ||
(MCMethodDefinition | ||
className: className asString | ||
classIsMeta: false | ||
selector: 'configurationExternalRef090:' | ||
category: 'cat' | ||
timeStamp: '' | ||
source: (self class sourceCodeAt: #'configurationExternalRef090:') asString). | ||
(MCMethodDefinition | ||
className: className asString | ||
classIsMeta: false | ||
selector: 'configurationExternalRef091:' | ||
category: 'cat' | ||
timeStamp: '' | ||
source: (self class sourceCodeAt: #'configurationExternalRef091:') asString)}. | ||
externalRepository | ||
basicStoreVersion: | ||
(MCVersion new | ||
setPackage: (MetacelloTestsMCPackage new name: reference packageName) | ||
info: | ||
(versionInfo := MCVersionInfo | ||
name: reference name | ||
id: UUID new | ||
message: 'This is a mock version' | ||
date: Date today | ||
time: Time now | ||
author: reference author | ||
ancestors: #()) | ||
snapshot: (MCSnapshot fromDefinitions: definitionArray) | ||
dependencies: #()). | ||
^ versionInfo |
52 changes: 52 additions & 0 deletions
52
...s.package/MetacelloScriptingResource.class/instance/setUpConfigurationExternalRefdkh2..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
baseline pragma - github reference | ||
setUpConfigurationExternalRefdkh2: ancestors | ||
"self reset" | ||
|
||
| reference className definitionArray versionInfo | | ||
reference := GoferVersionReference name: 'ConfigurationOfExternalRef-dkh.2'. | ||
className := #'ConfigurationOfExternalRef'. | ||
definitionArray := {(MCOrganizationDefinition | ||
categories: (Array with: reference packageName asSymbol)). | ||
(MCClassDefinition | ||
name: className | ||
superclassName: #'ConfigurationOf' | ||
category: reference packageName | ||
instVarNames: #() | ||
comment: ''). | ||
(MCMethodDefinition | ||
className: className asString | ||
classIsMeta: false | ||
selector: 'configurationExternalRef090:' | ||
category: 'cat' | ||
timeStamp: '' | ||
source: (self class sourceCodeAt: #'configurationExternalRef090:') asString). | ||
(MCMethodDefinition | ||
className: className asString | ||
classIsMeta: false | ||
selector: 'configurationExternalRef091:' | ||
category: 'cat' | ||
timeStamp: '' | ||
source: (self class sourceCodeAt: #'configurationExternalRef091:') asString). | ||
(MCMethodDefinition | ||
className: className asString | ||
classIsMeta: false | ||
selector: 'configurationExternalRef092:' | ||
category: 'cat' | ||
timeStamp: '' | ||
source: (self class sourceCodeAt: #'configurationExternalRef092:') asString)}. | ||
externalRepository | ||
basicStoreVersion: | ||
(MCVersion new | ||
setPackage: (MetacelloTestsMCPackage new name: reference packageName) | ||
info: | ||
(versionInfo := MCVersionInfo | ||
name: reference name | ||
id: UUID new | ||
message: 'This is a mock version' | ||
date: Date today | ||
time: Time now | ||
author: reference author | ||
ancestors: ancestors) | ||
snapshot: (MCSnapshot fromDefinitions: definitionArray) | ||
dependencies: #()). | ||
^ versionInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
repository/Metacello-TestsMCResources.package/monticello.meta/version
Large diffs are not rendered by default.
Oops, something went wrong.