Hacker News new | ask | show | jobs
by masklinn 5306 days ago
> if you're practicing BDD then your tests will be documenting how to use your code

I'm going to call bullshit on that one all the same.

1 comments

This site builds docs for projects based on their integration tests. I think it's a pretty good example of what you can achieve using BDD for documentation, https://www.relishapp.com/myronmarston/vcr
> I think it's a pretty good example of what you can achieve using BDD for documentation

And as expected, it's awful.

The front page looks good. It's also a Markdown document. Open any actual feature dump[0] and you land straight in dreadful-land. The introduction is acceptably readable (since it's written in markdown throughout), the "code samples" are mostly an unreadable mess with little logical flows and huge blocks of unreadable code. It manages to fail both at being a documentation and at being an APIdoc.

The most laughable part is the "Examples" sections as they show not examples but values with which the placeholders in the rspec test can be replaced.

The only part worth reading of these is the heading, which has nothing to do with RSpec, and the only thing rspec doee is makes this "documentation" worse by imposing the test's structure onto the documentation.

It's not even a step up form having only extracted APIDoc, it's a step down.

[0] https://www.relishapp.com/myronmarston/vcr/docs/cassettes/ca...