-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sequence #23
Comments
Hmm.. Its are meant to be independent of one-another. That way they can (and are if you -randomizeAllSpecs) be shuffled. this also helps avoid test pollution. I'd rather avoid breaking the It semantics if possible. Can you point me to some example code so I can look at and think about your use case more? Long Its can be a smell, but sometimes (especially in integration style tests) one ends up with long Its. I usually annotate them into sections with comments.. |
I understand. Personally I find it easier to have a test "count entites" fail instead of "datastore queries". My project is not open source yet, but I have created a gist to illustrate my integration test. It's a Go library to add a higher-level API to the App Engine high-replication datastore (HRD) (note that "101loops/bdd" wraps ginkgo/gomega and adds helper functions / uses slightly different syntax). |
I took a close look at your tests and have a few suggestions. I don't think this is one large Rather than try to explain what I mean, I've rewritten the query test to illustrate how shared setup can be implemented with Take a look and let me know if things make/don't make sense. |
Oops here's the gist: |
Hey, thanks for taking the time! I like your approach, it makes total sense. I will definitely apply it to this suite and upcoming ones. By the way: thanks for the great test runner and test matcher! :) |
Glad to help! Am always looking for feedback on Ginkgo and Gomega and I think it's cool that you've been able to wrap the library to map it onto semantics that you prefer :) |
I have a rather long spec that I had to split up into multiple
It
steps for readability and maintainability. But since each step depends on the success of the previous one it's rather annoying to go through dozens of failed tests to get to the root cause.So a
Sequence
could be a special kind ofDescription
that stops the execution of itsIt
s as soon as the first one fails.What do you think?
The text was updated successfully, but these errors were encountered: