generated from just-the-docs/just-the-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
47 lines (41 loc) · 1.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
layout: home
---
<article>
<h1>
What is it?
</h1>
<p>Even Better Specs is an <i>opinionated</i> set of best practices to support the creation of tests that are easy to read and maintain.</p>
<p>It focuses on the <a href="https://www.ruby-lang.org/en/" target="_blank">Ruby</a> testing framework <a href="https://rspec.info/" target="_blank">RSpec</a>, but some of it could potentially be applied to other frameworks and languages (like <a href="https://github.com/sus-rb/sus" target="_blank">sus</a> and <a href="https://crystal-lang.org/reference/1.13/guides/testing.html" target="_blank">Crystal</a>).</p>
<h2>
Guiding principles
</h2>
<ul>
<li>
tests must be <a href="https://thoughtbot.com/blog/the-self-contained-test" target="_blank">self-contained</a>, not DRY
</li>
<li>
tests should follow the <a href="https://automationpanda.com/2020/07/07/arrange-act-assert-a-pattern-for-writing-good-tests/" target="_blank">Arrange-Act-Assert</a> pattern
</li>
</ul>
</article>
{% include describe.html %}
{% include use_contexts.html %}
{% include factories_not_fixtures.html %}
{% include leverage_described_class.html %}
{% include use_subject.html %}
{% include short_description.html %}
{% include group_expectations.html %}
{% include all_possible_cases.html %}
{% include request_vs_controller.html %}
{% include expect_vs_should.html %}
{% include redundant_require.html %}
{% include instance_double_over_double.html %}
{% include lets_not.html %}
{% include avoid_hooks.html %}
{% include dont_use_shared_examples.html %}
{% include mock_external_dependencies.html %}
{% include stub_http_requests.html %}
{% include stub_env_vars.html %}
{% include create_only_the_data_you_need.html %}
{% include who_is_using_it.html %}