Replies: 2 comments 2 replies
-
Hello! Thank you for the kind words & am excited that you find
Yeah, that makes sense, I didn't think of this use case.
I think this is a totally reasonable use case and that the path forward should be for bulloak to be a bit more flexible.
Yes, that makes perfect sense 👍🏻 One consideration here is that since there is no root On an unrelated note, the errors look wonky, I should fix that and add a test for it. So, thank you for bringing that to my attention hehe.
I tried to refrain from adding opinionated docs because I wanted to see how people might start using BTT first and then iterate towards a good implementation. However, it's true that I should at least explain what is currently supported 👍🏻 Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Thanks for your questions @mds1. As ever, great feedback. First, I want to clarify that BTT is still very much a WIP (conceptually). For instance, even in Sablier, we've recently worked on a major refactor to use "given" instead of "when": sablier-labs/v2-core#642
It definitely should -
I agree that this would be helpful. Ideally, we would put together a bespoke docs website. But I just can never manage to find the time to do that, so adding a few simple guidelines in the Bulloak README sounds like a good first step in the right direciton.
The categories are fairly fuzzy but the rule of thumb is this:
They can. The goal is to follow the revert paths of the function, which may or may not be dependent on function params.
BTT is inspired by Cucumber, but it is not Cucumber, and it does not purport to be or evolve into Cucumber. |
Beta Was this translation helpful? Give feedback.
-
Bulloak looks really nice and I'm excited to try it out. I have a function like this OZ function:
There's no branching or conditionals here so I expected my
.tree
file to look very simple:But running
bulloak
against this errors with:I could add a "when called" condition, but this would add unnecessary clutter to the tree and tests since there's no conditions or paths in this method.
Should bulloak/BTT support specs of this style, or should I be doing things differently here? I think a good approach might be to only allow this IF all requirements (
it should
lines) are at the shallowest level and not preceded by any given's or when's.Related, I'd like to see a bit more info in the README on the requirements around
.tree
files, e.g. when arewhen
andgiven
required, can you only have one of the two, can their order be flipped or must it bewhen > given
, etc. The reason I ask here is I want to mirror the given > when > then flow of cucumber vs. the when > given > it should of BTT (perhaps both can be supported?)cc @PaulRBerg for thoughts too
Beta Was this translation helpful? Give feedback.
All reactions