dox Executable Documentation

Link to code hoster

If a code hosting website is provided, a link for the project and each specification is provided.

No link for project if hoster not set

When I request the resource at 'projects/MyProject'
Then 'codeLink' should be null

Show link for project

Given the project 'MyProject' has the hoster 'http://github.com/some/project'
When I request the resource at 'projects/MyProject'
Then 'codeLink/href' should be 'http://github.com/some/project'

No link for specification when hoster not set

When I request the resource at 'projects/MyProject/specs/some__Specification'
Then 'specification/codeLink' should be null

Show link for specification

Given the project 'MyProject' has the hoster 'http://github.com/some/project'
When I request the resource at 'projects/MyProject/specs/some__Specification'
Then 'specification/codeLink/href' should be 'http://github.com/some/project/blob/master/spec/some/SpecificationTest.php'

background

Given the project 'MyProject'
Given the file 'user/projects/MyProject/spec/some/SpecificationTest.php' with content '<?php class SpecificationTest { public function testSomeThings() {} }'