[Specs2_2.10 1.14] Write a specification like the UserGuide

46 views
Skip to first unread message

Michael Azerhad

unread,
May 8, 2013, 6:57:41 AM5/8/13
to specs2...@googlegroups.com
Hello,

I read the whole Specs2 documentation about Specification Structure.

My goal is to print a beautiful HTML page presenting my test results in a form pretty similar to the Specs2's UserGuide.

I searched for a long time and I have some questions that confuse me:
  1. In the documentation, it is explained that in order to add a title to some specification, we have to use  mySpecification.title.  Is there a way to add some subtitles like "Presentation" inside "Structure" section within the official UserGuide.
  2. What is better than looking at the code generating the UserGuide?  So, this is what I did, and .... I'm pretty confused. Looking at the way how subtitles (sections) are made, we found some syntaxes like: ## (big title)  ### (subtitle)  ####(sub-subtitle) ....    Should I use that??  If yes, what should I import and why there is nothing like this in the documentation :) 
  3. Specs2's version used to generate UserGuide is: 1.13-SNAPSHOT. Where is the trait: org.specs2.specification.Snippets when retrieved from SBT repository? Sounds like deleted.. 
To sum up, should I base on Documentation or Specs2 Github code?

Thanks a lot :)

Michael      


Michael Azerhad

unread,
May 8, 2013, 7:14:03 AM5/8/13
to specs2...@googlegroups.com
Ok, I've just read that this is PegDown which is translates markdown like "##" to HTML.

Surely, Specs2 documentation is more focus on general case than HTML outputting.

etorreborre

unread,
May 8, 2013, 7:18:39 AM5/8/13
to specs2...@googlegroups.com
Hi Michael,

The User Guide is indeed generated with Specifications containing Markdown text, rendered as HTML with the HtmlRunner. 

The current official guide was generated using specs2 1.14 and the Snippets trait is a new addition to capture code which you can try out in 1.15-SNAPSHOT, which is going to be a 2.0 version soon.

Cheers,

Eric.

Michael Azerhad

unread,
May 8, 2013, 7:31:49 AM5/8/13
to specs2...@googlegroups.com
Thanks Eric for your quickness :)

Fully understood.

Michael
Reply all
Reply to author
Forward
0 new messages