Skip to content
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

Need to document how assertions should almost always be included with the call and try to avoid test section. #14

Open
dreich-nucleus opened this issue Aug 20, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@dreich-nucleus
Copy link
Collaborator

The "tests" section would ideally never be written since the expect in the call should be all we ever need. However, there are many scenarios where this is the only way to test the outcome of a sequence of tests (ie. make sure that the new ID returned from a create user call is the same as the href returned from a search). However, this test section comes after all the calls are made. A pattern that showed up in the very first files written using the early framework was that these tests were hundreds of lines below the actual calls. It was difficult to keep track of what was being saved and what was later tested.

So, in the documentation for this framework, we should strongly discourage this pattern. The tests section is only to be used if the expect section of the calls can't implement the assertion desired.

Nothing to worry for this PR, except to maybe remove this test section from examples. In this case (I have not looked yet), you are probably asserting that these tests don't run, so you need them.

Originally posted by @dreich-nucleus in #13

@dreich-nucleus dreich-nucleus added the enhancement New feature or request label Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant