@@ -89,38 +89,29 @@ When you do begin working on your feature, here are some guidelines to consider:
8989## Developing
9090
9191To develop this project, you will need [ PHP] ( https://www.php.net ) ,
92- [ Composer] ( https://getcomposer.org ) , [ Bash] ( https://en.wikipedia.org/wiki/Bash_(Unix_shell) ) ,
93- and [ Expect] ( https://en.wikipedia.org/wiki/Expect ) .
92+ [ Composer] ( https://getcomposer.org ) , and [ Bash] ( https://en.wikipedia.org/wiki/Bash_(Unix_shell) ) .
9493
9594### Running Tests
9695
97- This project includes a suite of tests located in ` tests/expect/ ` . These tests
98- use the ` expect ` command to automate CLI interactions. The tests will run
99- automatically as part of continuous integration, or you may run them locally with:
96+ This project includes a suite of tests located in ` tests/ ` . These tests
97+ use [ Bats] ( https://bats-core.readthedocs.io/en/stable/ ) to test command line
98+ interaction. The tests will run automatically as part of continuous integration,
99+ and you may also run them locally.
100100
101- ```
102- composer test
103- ```
104-
105- To run the tests, you must have an up-to-date version of coreutils (8.30 or
106- later).
107-
108- To generate a new test:
101+ To ensure Bats is set up properly in your local environment, after cloning the
102+ project, download the Git submodules:
109103
104+ ``` bash
105+ cd composer-install/
106+ git submodule init
107+ git submodule update
110108```
111- cd tests/expect/
112- autoexpect ../../bin/path-to-script-to-test.sh
113- ```
114-
115- ` autoexpect ` will save the test to ` script.exp ` . Rename it with a more
116- descriptive name, and run it to ensure it does what you expect: ` ./script.exp ` .
117- You may need to edit the test file or add to it, according to your needs.
118109
119- Expect is an extension to the [ Tcl] ( https://en.wikipedia.org/wiki/Tcl ) scripting
120- language, so it may be helpful to learn a little about Tcl as you write tests.
110+ Then run:
121111
122- When done, ` cd ../.. ` and run ` composer test ` .
123- Your new test should run along with the other tests.
112+ ``` bash
113+ composer test
114+ ```
124115
125116[ github ] : https://github.com/ramsey/composer-install
126117[ issues ] : https://github.com/ramsey/composer-install/issues
0 commit comments