diff options
| author | Teddy Wing | 2015-05-25 19:29:04 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2015-05-25 19:29:04 -0400 | 
| commit | a1d56cd30c9d894a6eed2a3be78f6723877d0db3 (patch) | |
| tree | 842e55105fa3713ce692cbb0f9336d4deddd9605 /run_test.sh | |
| parent | cf2633ae340bce856d4b153d45c7b32d923b2e58 (diff) | |
| download | Beginning-Ruby-Exercises-a1d56cd30c9d894a6eed2a3be78f6723877d0db3.tar.bz2 | |
Create run_test.sh that will run tests for a single exercise
Make it easy for learners to run the tests for a single exercise.
Otherwise, calling
    ruby exercises_spec.rb
would run all the tests, producing error output for exercises we haven't
even written yet. This allows us to run the appropriate tests as needed.
Diffstat (limited to 'run_test.sh')
| -rwxr-xr-x | run_test.sh | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/run_test.sh b/run_test.sh new file mode 100755 index 0000000..9ddba76 --- /dev/null +++ b/run_test.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +exercises=( \ +	/#divide/ \ +	/#hello5/ \ +	/#hello_x_times/ \ +	/#string_plus/ \ +	/#join_reverse_array/ \ +	/#array_tack_join/ \ +	/Table/ \ +	/Table2#height_times2/ \ +) + +if [ $# -lt 1 ]; then +	echo "Usage: $0 [number]" +	echo "[number] is the exercise number you want to run tests for." +	exit 1 +fi + +ruby exercises_spec.rb --name ${exercises[$1 - 1]} | 
