Skip to content

Commit

Permalink
Update baseline.
Browse files Browse the repository at this point in the history
Use the new testing extensions in Buoy
  • Loading branch information
gcotelli committed Jan 24, 2019
1 parent 2db3bfb commit 82343e8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 31 deletions.
39 changes: 28 additions & 11 deletions source/BaselineOfMole/BaselineOfMole.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,39 @@ BaselineOfMole >> baseline: spec [

<baseline>
spec
for: #common
do: [ spec blessing: #baseline.
self setUpDependencies: spec.
for: #pharo
do: [ self
setUpDependencies: spec;
baselineMole: spec.
spec
package: 'Mole' with: [ spec requires: 'Buoy' ];
package: 'Mole-Tests' with: [ spec requires: 'Mole' ].
spec
group: 'Deployment' with: #('Mole');
group: 'Development' with: #('Mole-Tests');
group: 'default' with: #('Deployment') ]
group: 'CI' with: 'Tests';
group: 'Tools' with: 'Buoy-Tools';
group: 'Development' with: #('Tests' 'Tools')
]
]

{ #category : #baselines }
BaselineOfMole >> baselineMole: spec [

spec
package: 'Mole' with: [ spec requires: 'Buoy-Deployment' ];
group: 'Deployment' with: #('Mole');
package: 'Mole-Tests' with: [ spec requires: #('Mole' 'Buoy-SUnit') ];
group: 'Tests' with: #('Mole-Tests')
]

{ #category : #baselines }
BaselineOfMole >> projectClass [

^ MetacelloCypressBaselineProject
]

{ #category : #initialization }
BaselineOfMole >> setUpDependencies: spec [

spec
baseline: 'Buoy' with: [ spec repository: 'github://ba-st/Buoy:v4/source' ];
import: 'Buoy'
baseline: 'Buoy' with: [ spec repository: 'github://ba-st/Buoy:v5/source' ];
project: 'Buoy-Deployment' copyFrom: 'Buoy' with: [ spec loads: 'Deployment' ];
project: 'Buoy-SUnit' copyFrom: 'Buoy' with: [ spec loads: 'Dependent-SUnit-Extensions' ];
project: 'Buoy-Tools' copyFrom: 'Buoy' with: [ spec loads: 'Tools' ].
]
8 changes: 2 additions & 6 deletions source/Mole-Tests/DirectedGraphTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ DirectedGraphTest >> testCreateGraphWithInvalidEdge [
self
should: [ DirectedGraph withVertices: vertices andEdges: edges ]
raise: InstanceCreationFailed
withExceptionDo: [ :error |
self
assert: error messageText
equals: 'Some edge has endpoints not included in the vertices.' ]
withMessageText: 'Some edge has endpoints not included in the vertices.'
]

{ #category : #'tests - instance creation' }
Expand All @@ -98,8 +95,7 @@ DirectedGraphTest >> testCreateGraphWithInvalidEdgeType [
self
should: [ DirectedGraph withVertices: vertices andEdges: edges ]
raise: InstanceCreationFailed
withExceptionDo:
[ :error | self assert: error messageText equals: 'Some edge is incompatible with this type of graph.' ]
withMessageText: 'Some edge is incompatible with this type of graph.'
]

{ #category : #'tests - accessing' }
Expand Down
10 changes: 2 additions & 8 deletions source/Mole-Tests/UndirectedEdgeTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,12 @@ UndirectedEdgeTest >> testInvalidCreation [
self
should: [ UndirectedEdge relating: #() ]
raise: InstanceCreationFailed
withExceptionDo: [ :exception |
self
assert: exception messageText
equals: 'Undirected edges must specify exactly 2 vertices' ].
withMessageText: 'Undirected edges must specify exactly 2 vertices'.

self
should: [ UndirectedEdge relating: #(1 2 3) ]
raise: InstanceCreationFailed
withExceptionDo: [ :exception |
self
assert: exception messageText
equals: 'Undirected edges must specify exactly 2 vertices' ]
withMessageText: 'Undirected edges must specify exactly 2 vertices'
]

{ #category : #tests }
Expand Down
8 changes: 2 additions & 6 deletions source/Mole-Tests/UndirectedGraphTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ UndirectedGraphTest >> testCreateGraphWithInvalidEdge [
self
should: [ UndirectedGraph withVertices: vertices andEdges: edges ]
raise: InstanceCreationFailed
withExceptionDo: [ :error |
self
assert: error messageText
equals: 'Some edge has endpoints not included in the vertices.' ]
withMessageText: 'Some edge has endpoints not included in the vertices.'
]

{ #category : #'tests - instance creation' }
Expand All @@ -86,8 +83,7 @@ UndirectedGraphTest >> testCreateGraphWithInvalidEdgeType [
self
should: [ UndirectedGraph withVertices: vertices andEdges: edges ]
raise: InstanceCreationFailed
withExceptionDo:
[ :error | self assert: error messageText equals: 'Some edge is incompatible with this type of graph.' ]
withMessageText: 'Some edge is incompatible with this type of graph.'
]

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

0 comments on commit 82343e8

Please sign in to comment.