franela/goblin

Documentation for Before and After

caldempsey opened this issue · 2 comments

Hi Goblin,

Unsure what Before and After mean (after all or before all or after each or before each)? Can we add some documentation on the After block to provide that. Happy to submit a pull request, just need clarification myself.

Thanks for the great framework. Go was really missing a clean lightweight solution for BDD.

Hey there!

Goblin is heavily inspired by Nodejs mocha's testing framework (https://mochajs.org/). Regarding before, after, beforeEach and afterEach, they work the same way as mocha's (https://mochajs.org/api/module-interfaces_common.html).

If you want to send a PR to help clarify this in the README, i'll happily merge it.

@marcosnils Yeah would like to make a contribution for my badges, seems like a good one. Really think adding solid docs with key-words that get caught in Google will help show the Go community the value of BDD syntax. Many of us are stuck with the 'testing' framework, doesn't have the tools you want if you're test-driven IMHO.

Will try to get something in within the next fortnight.