Sha256: 99197ce585ec2a315cef33b0e41d939a5fa1cdac15e405234970aeb5d6973fb3
Contents?: true
Size: 871 Bytes
Versions: 19
Compression:
Stored size: 871 Bytes
Contents
#!/bin/bash set -euo pipefail IFS=$'\n\t' setup() { ./script/setup } teardown() { ./script/teardown } run_all() { bundle exec rake } run_unit_tests() { bundle exec rake spec:coverage } run_isolation_tests() { local pwd=$PWD local root="$pwd/spec/isolation" run_tests $root } run_integration_tests() { local pwd=$PWD local root="$pwd/spec/integration" run_tests $root } run_tests() { local root=$1 for test in $(find $root -name '*_spec.rb') do run_test $test if [ $? -ne 0 ]; then local exit_code=$? echo "Failing test: $test" exit $exit_code fi done } run_test() { local test=$1 printf "\n\n\nRunning: $test\n" COVERAGE=true bundle exec rspec $test } main() { setup && run_all # run_unit_tests && # run_isolation_tests && # run_integration_tests } trap teardown EXIT main
Version data entries
19 entries across 19 versions & 2 rubygems