Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation from Tests Roadmap #16

Open
alganet opened this issue Jul 8, 2012 · 2 comments
Open

Documentation from Tests Roadmap #16

alganet opened this issue Jul 8, 2012 · 2 comments

Comments

@alganet
Copy link
Member

alganet commented Jul 8, 2012

After working on better tests for Respect I've imagined some use cases for Respect\Doc that could be easy to implement.

The first is related to test method names and its meaning. Respect\Doc should be able to cover these cases:

Class: Respect\Rest\Router
Case: Respect\Rest\RouterTest
Method: staticRoute
Test: testStaticRoute
Meaning: Without even specifying @covers, Doc should be able to know that this test is about a method

Class: Respect\Rest\Router
Case: Respect\Rest\RouterTest
Method: staticRoute
Test: testItCanConstructStaticRoutesFromStrings
Meaning: Doc only know the method if @covers is specified, if not, the test is about the entire class behavior. It knows which this test is supposed to do as well because no method is matched. The @example tag could be used for displaying usage samples.

Class: Respect\Rest\Router
Case: Respect\Rest\RouterTest
Method: staticRoute
Test: testStaticRouteShouldAllowArrays
Meaning: Without even specifying @covers, Doc should be able to know that this test is about a method. It knows which this test is supposed to do as well by the Should keyword. This could be index on the specific section for this method. Doc could also use @example tags on the tests and display them on the generated documentation.


Grouping and linking documentation is also one of my goals. Tests with similar names (we should use levenshtein() or something like this) need to be grouped and sorted with meaning when listed on the single Markdown generated by Doc.

Related methods can be discovered by the @covers and @example tags. We should run text comparison between samples as well to try to identify similar samples and group these methods together as well.

@augustohp
Copy link
Member

+1

This was referenced Sep 5, 2012
@nickl-
Copy link
Member

nickl- commented Sep 12, 2012

Applaus
Clapping pandas === Happy pandas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants