Permalink
Browse files

Issue #125: add toolbox api tests (fix bug)

  • Loading branch information...
1 parent 3fb3c0b commit 6b622d3a9fc936dda271376559741ad071ecd4c2 Dale Henrichs committed Sep 12, 2012
@@ -6,6 +6,10 @@ attributePrintString
ifTrue: [ stream nextPutAll: '#' , attributes first asString printString ]
ifFalse: [
stream nextPutAll: '#('.
- self attributes do: [ :attribute | stream nextPutAll: '#' , attribute asString printString ].
+ self attributes
+ do: [ :attribute |
+ stream
+ nextPutAll: '#' , attribute asString printString;
+ space ].
stream nextPut: $) ].
^ stream contents
@@ -4,6 +4,6 @@
"instance" : {
"attribute" : "dkh 9/7/2012 10:45",
"attribute:" : "dkh 9/7/2012 10:49",
- "attributePrintString" : "dkh 9/7/2012 07:13",
+ "attributePrintString" : "dkh 9/12/2012 09:46",
"attributes" : "dkh 9/7/2012 06:42",
"attributes:" : "dkh 9/8/2012 05:41" } }

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,51 @@
+private
+baseline10Issue125AddSourceString
+ ^ 'baseline100: spec
+ <version: ''1.0-baseline''>
+
+ spec for: #''common'' do: [
+ spec blessing: #''baseline''.
+ spec repository: ''dictionary://Metacello_Dev_Cycle_Repository''.
+ spec project: ''MetacelloTestConfigurationOfFoo'' with: [
+ spec
+ className: ''MetacelloTestConfigurationOfFoo'';
+ versionString: #''bleedingEdge'';
+ repository: ''dictionary://Metacello_Dev_Cycle_Repository'' ].
+ spec
+ package: ''GeauxFaux'' with: [
+ spec requires: #(''MetacelloTestConfigurationOfFoo'' ). ];
+ package: ''GeauxBeau'' with: [
+ spec requires: #(''GeauxFaux'' ). ].
+ spec
+ group: ''default'' with: #(''Core'' );
+ group: ''Core'' with: #(''GeauxFaux'' );
+ group: ''Tests'' with: #(''GeauxBeau'' );
+ group: ''Core Tests'' with: #(''Core'' ''Tests'' ). ].
+
+ spec for: #(#''pharo1.0.x'' #''pharo1.3.x'' ) do: [
+ spec blessing: #''baseline''.
+ spec
+ package: ''GeauxFaux'' with: [
+ spec includes: #(''GoferFaux'' ). ];
+ package: ''GeauxBeau'' with: [
+ spec requires: #(''GeauxFaux'' ). ];
+ package: ''GoferBar'' with: [
+ spec
+ repositories: [
+ spec
+ repository: ''http://example.com/repo1'';
+ repository: ''http://example.com/repo2'' ];
+ preLoadDoIt: #''preloadGoferBar''. ];
+ package: ''GoferBeau'' with: [
+ spec
+ supplyingAnswers: #( #( ''list of packages'' ''Kernel* Collection*'' ) );
+ file: ''GoferBeau.pharo'';
+ postLoadDoIt: #''postloadGoferBar''. ];
+ package: ''GoferFaux'' with: [
+ spec repository: ''http://example.com/repo2''. ].
+ spec
+ group: ''default'' with: #(''Core'' );
+ group: ''Core'' with: #(''GeauxFaux'' );
+ group: ''Tests'' with: #(''GeauxBeau'' );
+ group: ''Core Tests'' with: #(''Core'' ''Tests'' ). ].
+'
@@ -0,0 +1,55 @@
+private
+baseline10Issue125ModifySourceString
+ ^ 'baseline100: spec
+ <version: ''1.0-baseline''>
+
+ spec for: #''common'' do: [
+ spec blessing: #''baseline''.
+ spec repository: ''dictionary://Metacello_Dev_Cycle_Repository''.
+ spec project: ''MetacelloTestConfigurationOfFoo'' with: [
+ spec
+ className: ''MetacelloTestConfigurationOfFoo'';
+ versionString: #''bleedingEdge'';
+ repository: ''dictionary://Metacello_Dev_Cycle_Repository'' ].
+ spec
+ package: ''GeauxFaux'' with: [
+ spec requires: #(''MetacelloTestConfigurationOfFoo'' ). ];
+ package: ''GeauxBeau'' with: [
+ spec requires: #(''GeauxFaux'' ). ].
+ spec
+ group: ''default'' with: #(''Core'' );
+ group: ''Core'' with: #(''GeauxFaux'' );
+ group: ''Tests'' with: #(''GeauxBeau'' );
+ group: ''Core Tests'' with: #(''Core'' ''Tests'' ). ].
+
+ spec for: #(#''pharo1.0.x'' #''pharo1.3.x'' ) do: [
+ spec blessing: #''baseline''.
+ spec
+ package: ''GeauxFaux'' with: [
+ spec
+ requires: #(''GoferFoo'' );
+ includes: #(''GoferFaux'' );
+ repository: ''http://www.squeaksource.com/CommandShell''. ];
+ package: ''GeauxBeau'' with: [
+ spec requires: #(''GeauxFaux'' ). ];
+ package: ''GoferBar'' with: [
+ spec
+ repositories: [
+ spec
+ repository: ''http://example.com/repo1'';
+ repository: ''http://example.com/repo2'' ];
+ preLoadDoIt: #''preloadGoferBar''. ];
+ package: ''GoferBeau'' with: [
+ spec
+ supplyingAnswers: #( #( ''list of packages'' ''Kernel* Collection*'' ) );
+ file: ''GoferBeau.pharo'';
+ postLoadDoIt: #''postloadGoferBar''. ];
+ package: ''GoferFaux'' with: [
+ spec repository: ''http://example.com/repo2''. ];
+ package: ''GoferFoo''.
+ spec
+ group: ''default'' with: #(''Core'' );
+ group: ''Core'' with: #(''GeauxFaux'' );
+ group: ''Tests'' with: #(''GeauxBeau'' );
+ group: ''Core Tests'' with: #(''Core'' ''Tests'' ). ].
+'
@@ -0,0 +1,44 @@
+utility
+create10BaselineIssue125
+ (MetacelloToolBox configurationNamed: self configurationName asString)
+ createVersionMethod: 'baseline100:' inCategory: 'baselines' forVersion: '1.0-baseline';
+ addSection: #'common'
+ repository: 'dictionary://' , self repositoryName asString
+ requiredProjects: #('MetacelloTestConfigurationOfFoo')
+ packages: #('GeauxFaux' 'GeauxBeau')
+ repositories: {('MetacelloTestConfigurationOfFoo' -> {('dictionary://' , self repositoryName asString)})}
+ dependencies:
+ {('GeauxFaux' -> #('MetacelloTestConfigurationOfFoo')).
+ ('GeauxBeau' -> #('GeauxFaux'))}
+ groups:
+ {('default' -> #('Core')).
+ ('Core' -> #('GeauxFaux')).
+ ('Tests' -> #('GeauxBeau')).
+ ('Core Tests' -> #('Core' 'Tests'))}
+ versionSpecsDo: [ :versionSpec | versionSpec blessing: #'baseline' ];
+ commitMethod;
+ modifyVersionMethodForVersion: '1.0-baseline' versionSpecsDo: [ :attribute :versionSpec | true ];
+ addSection: (MetacelloMethodSectionPath with: #(#'pharo1.0.x' #'pharo1.3.x'))
+ repository: nil
+ requiredProjects: #()
+ packages: #('GeauxFaux' 'GeauxBeau' 'GoferBar' 'GoferBeau' 'GoferFaux')
+ dependencies: {('GeauxBeau' -> #('GeauxFaux'))}
+ includes: {('GeauxFaux' -> #('GoferFaux'))}
+ files: {('GoferBeau' -> 'GoferBeau.pharo')}
+ repositories:
+ {('GoferBar' -> #('http://example.com/repo1' 'http://example.com/repo2')).
+ ('GoferFaux' -> #('http://example.com/repo2'))}
+ preLoadDoIts: {('GoferBar' -> #'preloadGoferBar')}
+ postLoadDoIts: {('GoferBeau' -> #'postloadGoferBar')}
+ supplyingAnswers:
+ {('GoferBeau'
+ ->
+ {{'list of packages'.
+ 'Kernel* Collection*'}})}
+ groups:
+ {('default' -> #('Core')).
+ ('Core' -> #('GeauxFaux')).
+ ('Tests' -> #('GeauxBeau')).
+ ('Core Tests' -> #('Core' 'Tests'))}
+ versionSpecsDo: [ :versionSpec | versionSpec blessing: #'baseline' ];
+ commitMethod
@@ -0,0 +1,8 @@
+tests
+testIssue125AddSection
+ "https://github.com/dalehenrich/metacello-work/issues/125"
+
+ self create10BaselineIssue125.
+ self
+ assert:
+ ((Smalltalk at: self configurationName) sourceCodeAt: #'baseline100:') = self baseline10Issue125AddSourceString
@@ -0,0 +1,23 @@
+tests
+testIssue125ModifySection
+ "https://github.com/dalehenrich/metacello-work/issues/125"
+
+ self create10BaselineIssue125.
+ MetacelloToolBox
+ modifyVersion: '1.0-baseline'
+ section: (MetacelloMethodSectionPath with: #(#'pharo1.0.x' #'pharo1.3.x'))
+ for: self configurationName asString
+ repository: nil
+ requiredProjects: #()
+ packages: #('GoferFoo')
+ dependencies: {('GeauxFaux' -> #('GoferFoo'))}
+ includes: #()
+ files: #()
+ repositories: {('GeauxFaux' -> #('http://www.squeaksource.com/CommandShell'))}
+ preLoadDoIts: #()
+ postLoadDoIts: #()
+ supplyingAnswers: #()
+ groups: #().
+ self
+ assert:
+ ((Smalltalk at: self configurationName) sourceCodeAt: #'baseline100:') = self baseline10Issue125ModifySourceString
@@ -3,13 +3,16 @@
},
"instance" : {
"alternatRepositoryName" : "dkh 6/12/2012 15:41:23.319",
+ "baseline10Issue125AddSourceString" : "dkh 9/12/2012 09:51",
+ "baseline10Issue125ModifySourceString" : "dkh 9/12/2012 09:56",
"baseline11SourceString" : "dkh 6/12/2012 15:41:23.319",
"baseline12SourceString" : "dkh 6/12/2012 15:41:23.319",
"complexBaseline11SourceString" : "dkh 6/12/2012 15:41:23.319",
"complexBaseline11SourceString2" : "dkh 6/12/2012 15:41:23.319",
"complexBaseline11SourceString3" : "dkh 6/12/2012 15:41:23.319",
"configurationName" : "dkh 6/12/2012 15:41:23.319",
"create10Baseline" : "dkh 6/12/2012 15:41:23.319",
+ "create10BaselineIssue125" : "dkh 9/12/2012 09:44",
"createComplex11Baseline" : "dkh 6/12/2012 15:41:23.319",
"createNested12Baseline" : "dkh 9/8/2012 05:51",
"hasPackage:" : "dkh 6/12/2012 15:41:23.319",
@@ -29,6 +32,8 @@
"testComplexNullModifyBaseline" : "dkh 6/12/2012 15:41:23.319",
"testImportFrom1" : "dkh 9/7/2012 14:00",
"testImportFrom2" : "dkh 9/8/2012 05:52",
+ "testIssue125AddSection" : "dkh 9/12/2012 09:51",
+ "testIssue125ModifySection" : "dkh 9/12/2012 09:56",
"testIssue5A" : "dkh 6/12/2012 15:41:23.319",
"testIssue5B" : "dkh 6/12/2012 15:41:23.319",
"testIssue5C" : "dkh 6/12/2012 15:41:23.319",

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 6b622d3

Please sign in to comment.