Skip to content

Commit f605066

Browse files
committed
test writing/naming/grouping
1 parent 14333cb commit f605066

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contributing.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ Groups of tests are in `.bats` files in the repository root. You can [run tests
2323

2424
Discrete chunks of code should have a discrete set of tests. If possible, tests should call the relevant function rather than running the whole script.
2525

26-
Write test names so that they tell a story for a test group, and indent each test.
26+
Write tests like [executable specifications](https://youtu.be/XcT4yYu_TTs?t=17m20s).
27+
28+
Group together tests that share a common subject by indenting test names with spaces, to achieve output similar to [Mocha](http://mochajs.org/#spec) or [RSpec](http://rspec.info/#asciicast-iframe-14103).
2729

2830
For anything that involves touching the file system, use `setup()` & `teardown()` functions to create a temporary directory:
2931

0 commit comments

Comments
 (0)