onsi / ginkgo

A Modern Testing Framework for Go
http://onsi.github.io/ginkgo/
MIT License
8.22k stars 650 forks source link

Missing book.go file? #1254

Open celdaran opened 1 year ago

celdaran commented 1 year ago

I must be missing something obvious here, but I'm walking through the tutoral and finding unit tests for a non-existent Book struct. Are we meant to write that on our own? I can suss it out based on the tests, but it seems an odd omission when trying to get new developers up to speed quickly on the framework. Which is why I feel like I'm missing something really obvious (especially since no one else seems to be talking about it).

onsi commented 1 year ago

Hey @celdaran - you aren't missing anything! The docs aren't really intended to be a follow-as-you-go tutorial but rather a set of conceptual examples. There isn't a book.go file (though a case very well could be made for having an example repo that folks could clone to play with as they learn Ginkgo). Rather the intent was to explain how things work and then have folks build tests for their own code.

Sorry for the confusion!

celdaran commented 1 year ago

Fair enough. Though after some digging I found that v1 actually did ship with a full examples directory and so it looks like a conscious decision was made to drop it. Perhaps solely in favor of the Getting Started docs.

For someone relatively new to Go and absolutely new to Ginkgo, it was a bit of an uphill battle trying to get a fully working test suite. And while the intention wasn't "to be a follow-as-you-go tutorial" ironically, it's about 95% that already. I think if book.go and /path/to/book were supplied, that would take it to 100%.

Thanks for the quick reply.