Issue 169 in metacello: odd spec passes validation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue 169 in metacello: odd spec passes validation

metacello
Status: Accepted
Owner: [hidden email]
Labels: Type-Defect Priority-Medium Product-Core Milestone-1.0-beta.32

New issue 169 by [hidden email]: odd spec passes validation
http://code.google.com/p/metacello/issues/detail?id=169

This spec passes validation, but I don't think it should ... I haven't  
determined what happens when you try to load one of these, but I imagine  
that it might not be pretty:

        <version: '1.0-baseline'>

        spec for: #'common' do: [
                spec blessing: #'baseline'.
                spec repository: 'dictionary://Metacello_Dev_Cycle_Repository'.
                spec package: 'AAA' with: [
                                spec requires: #('MetacelloTestConfigurationOfFoo' ). ].
                spec group: 'MetacelloTestConfigurationOfFoo' with:  
#('MetacelloTestConfigurationOfFoo' ). ].

discovered while writing tests for Issue 5. Here's the test case:

     | expectException issues validationError |
     expectException := false.
     [
     MetacelloToolBox
         createBaseline: '1.0-baseline'
         for: self configurationName asString
         repository: 'dictionary://' , self repositoryName asString
         requiredProjects: #()
         packages: #('AAA')
         dependencies: {('AAA' -> #('MetacelloTestConfigurationOfFoo'))}
         groups: {('MetacelloTestConfigurationOfFoo' ->  
#('MetacelloTestConfigurationOfFoo'))} ]
         on: MetacelloValidationFailure
         do: [ :ex |
             issues := ex issues.
             expectException := true ].
     self assert: expectException.
     self assert: issues size == 1.
     validationError := issues at: 1.
     self assert: validationError reasonCode == #versionCompositionError.
     self assert: validationError callSite == #validateProject:version: