1
|
1 |
"{ Package: 'stx:goodies/metacello' }"
|
|
2 |
|
|
3 |
MetacelloSpecTestCase subclass:#MetacelloGroupSpecTestCase
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Metacello-TestsCore-Specs'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!MetacelloGroupSpecTestCase methodsFor:'tests'!
|
|
12 |
|
|
13 |
testGroupMergeSpec
|
|
14 |
| groupA groupB group |
|
|
15 |
groupA := self groupSpec
|
|
16 |
name: 'Platform';
|
|
17 |
includes: 'Core';
|
|
18 |
yourself.
|
|
19 |
groupB := self groupSpec
|
|
20 |
name: 'Platform';
|
|
21 |
includes: 'Tests';
|
|
22 |
yourself.
|
|
23 |
group := groupA mergeSpec: groupB.
|
|
24 |
self assert: (group includes includes: 'Core').
|
|
25 |
self assert: (group includes includes: 'Tests')
|
|
26 |
!
|
|
27 |
|
|
28 |
testGroupSpec
|
|
29 |
| group |
|
|
30 |
group := self groupSpec
|
|
31 |
name: 'Platform';
|
|
32 |
includes: 'Core';
|
|
33 |
yourself.
|
|
34 |
self assert: group name = 'Platform'.
|
|
35 |
self assert: (group includes includes: 'Core').
|
|
36 |
group := self groupSpec
|
|
37 |
name: 'Platform';
|
|
38 |
includes: #('Core');
|
|
39 |
yourself.
|
|
40 |
self assert: group name = 'Platform'.
|
|
41 |
self assert: (group includes includes: 'Core').
|
|
42 |
self should: [ group requires: #() ] raise: Error.
|
|
43 |
self should: [ group answers: #() ] raise: Error.
|
|
44 |
group
|
|
45 |
projectDo: [ :ignored | self assert: false ]
|
|
46 |
packageDo: [ :ignored | self assert: false ]
|
|
47 |
groupDo: [ :grp | self assert: group == grp ]
|
|
48 |
! !
|
|
49 |
|
|
50 |
!MetacelloGroupSpecTestCase class methodsFor:'documentation'!
|
|
51 |
|
|
52 |
version_SVN
|
|
53 |
^ '$Id:: $'
|
|
54 |
! !
|