23 lines
488 B
Bash
Executable File
23 lines
488 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Starting spec run"
|
|
SPECS=$(find spec -name "*_spec.rb")
|
|
echo "Found specs: $SPECS"
|
|
|
|
for spec in $SPECS; do
|
|
echo "Running $spec"
|
|
spec_name=$(basename "$spec" .rb)
|
|
|
|
echo "Redirecting output to spec_results/$spec_name.txt"
|
|
exec 3>&1 4>&2 >"spec_results/$spec_name.txt" 2>&1
|
|
|
|
echo "Executing bundle exec rspec"
|
|
bundle exec rspec "$spec"
|
|
|
|
echo "Restoring stdout and stderr"
|
|
exec 1>&3 2>&4
|
|
echo "Finished running $spec"
|
|
done
|
|
|
|
echo "Spec run finished"
|