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

Add core guidelines examples #2

Open
3 of 7 tasks
mokagio opened this issue Jul 18, 2017 · 2 comments
Open
3 of 7 tasks

Add core guidelines examples #2

mokagio opened this issue Jul 18, 2017 · 2 comments
Assignees

Comments

@mokagio
Copy link
Contributor

mokagio commented Jul 18, 2017

Now that our core guidelines have been defined, see #1, we should provide examples of how to apply them.

I'd like to see examples of

  • Test behaviour not implementation
  • Fast
  • Isolated
  • Self-verifying
  • Tests should read like sentences
  • One assertion per test
  • AAA

I think fast and isolated are quite related with each other, so they might have an example together.

In the case of "test behaviour not implementation" I'd suggest having a preferred vs not preferred example, to make it clearer what the difference is.

@marcelmika
Copy link
Contributor

What do you think about using the banana example for the "Test behavior, not implementation": https://github.com/Quick/Quick/blob/master/Documentation/en-us/BehavioralTesting.md

I can create some other but I think this is quite sufficient.

@mokagio
Copy link
Contributor Author

mokagio commented Jul 20, 2017

I think that example is great and definitely could be added as a "further reading". From my point of view it's too long though. Also the fact that it looks into a database will result a bit confusing later on when we'll suggest to use a test double for such things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants