summaryrefslogtreecommitdiff
path: root/spec/ruby/README.md
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-21 15:38:59 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-21 15:38:59 +0000
commitda7976235fbc2986925969646071bebe3702e49f (patch)
tree83bbf6a8e03cf990369feabe6c1c9d45c69f4c85 /spec/ruby/README.md
parentb8e389a0f3226c90e96e02e6396686a3bef6a456 (diff)
Update to ruby/spec@7a16e01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/README.md')
-rw-r--r--spec/ruby/README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/ruby/README.md b/spec/ruby/README.md
index a2fa5f0..7cb9ada 100644
--- a/spec/ruby/README.md
+++ b/spec/ruby/README.md
@@ -98,6 +98,23 @@ In similar fashion, the following commands run the respective specs:
$ ../mspec/bin/mspec :library
$ ../mspec/bin/mspec :capi
+### Sanity Checks When Running Specs
+
+A number of checks for various kind of "leaks" (file descriptors, temporary files,
+threads, subprocesses, `ENV`, `ARGV`, global encodings, top-level constants) can be
+enabled with `CHECK_LEAKS=true`:
+
+ $ CHECK_LEAKS=true ../mspec/bin/mspec
+
+New top-level constants should only be introduced when needed or follow the
+pattern `<ClassBeingTested>Specs` such as `module StringSpecs`.
+Other constants used for testing should be nested under such a module.
+
+Exceptions to these rules are contained in the file `.mspec.constants`.
+MSpec can automatically add new top-level constants in this file with:
+
+ $ CHECK_LEAKS=save mspec ../mspec/bin/mspec file
+
### Contributing and Writing Specs
See [CONTRIBUTING.md](https://github.com/ruby/spec/blob/master/CONTRIBUTING.md) for documentation about contributing and writing specs (guards, matchers, etc).