Skip to content

Commit 45a006f

Browse files
committed
Merge pull request #116 from sviridov/cask-and-ert-runner-take-two
Add "How to run tests" section to CONTRIBUTING.md
2 parents c42ed23 + 20cf511 commit 45a006f

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

CONTRIBUTING.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,93 @@ In order to be merged into emacs-elixir, contributions must have the following:
5555
If your contribution lacks any of these things, they will have to be added
5656
by a core contributor before being merged into emacs-elixir proper, which may take
5757
substantial time for the all-volunteer team to get to.
58+
59+
## How to run tests
60+
61+
There are three tools that helps us to test emacs-elixir:
62+
63+
* [EVM](https://github.com/rejeep/evm) - a command-line tool which allows you to easily install, manage, and work with multiple Emacs versions.
64+
* [Cask](https://github.com/cask/cask) - a project management tool for Emacs that helps automate the package development cycle.
65+
* [Ert-runner](https://github.com/rejeep/ert-runner.el) - a tool for Emacs projects tested using Ert.
66+
67+
### Emacs Version Manager
68+
69+
To install [EVM](https://github.com/rejeep/evm), run:
70+
71+
```bash
72+
$ sudo mkdir /usr/local/evm
73+
$ sudo chown $USER: /usr/local/evm
74+
$ curl -fsSkL https://raw.github.com/rejeep/evm/master/go | bash
75+
$ export PATH="~/.evm/bin:$PATH" # Add it to your .bashrc or analogue
76+
```
77+
78+
To list all available Emacs versions you can install, run:
79+
80+
```bash
81+
$ evm list
82+
```
83+
84+
To install a version (for example `emacs-24.3-bin`), run:
85+
86+
```bash
87+
$ evm install emacs-24.3-bin
88+
```
89+
90+
Read more about [EVM](https://github.com/rejeep/evm).
91+
92+
### Cask and ert-runner
93+
94+
To install Cask, run:
95+
96+
```bash
97+
$ curl -fsSkL https://raw.github.com/cask/cask/master/go | python
98+
$ export PATH="~/.cask/bin:$PATH" # Add it to your .bashrc or analogue
99+
```
100+
101+
To install [Ert-runner](https://github.com/rejeep/ert-runner.el), run:
102+
103+
```bash
104+
$ cd path/to/emacs-elixir
105+
$ cask install # install ert-runner
106+
$ EMACS=`evm bin emacs-24.3-bin` cask install # install ert-runner for Emacs 24.3
107+
```
108+
109+
#### Examples of usage
110+
111+
* Run all tests:
112+
113+
```bash
114+
$ cask exec ert-runner
115+
```
116+
117+
* Run all tests for Emacs 24.3:
118+
119+
```bash
120+
$ EMACS=`evm bin emacs-24.3-bin` cask exec ert-runner
121+
```
122+
123+
Run all tests which are tagged `fontification`:
124+
125+
```bash
126+
$ cask exec ert-runner -t fontification
127+
```
128+
129+
Run all tests with `elixir-smie-verbose-p` equal to `t`:
130+
131+
```bash
132+
$ cask exec ert-runner --verbose
133+
```
134+
135+
Run all tests interactively:
136+
137+
```bash
138+
$ cask exec ert-runner --win
139+
```
140+
141+
Run all tests which are tagged `fontification` for Emacs 24.3 interactively:
142+
143+
```bash
144+
$ EMACS=`evm bin emacs-24.3-bin` cask exec ert-runner -t fontification --win
145+
```
146+
147+
Read more about [Cask](https://github.com/cask/cask) and [Ert-runner](https://github.com/rejeep/ert-runner.el).

0 commit comments

Comments
 (0)