Fix up script/cucumber and script/test

This commit is contained in:
Parker Moore 2014-08-12 16:38:39 -04:00
parent 530e049d2d
commit 56b9238af5
3 changed files with 15 additions and 9 deletions

View File

@ -1,3 +0,0 @@
default: --format pretty
travis: --format progress
html_report: --format progress --format html --out=features_report.html

View File

@ -1,3 +1,9 @@
#!/bin/bash #!/bin/bash
bundle exec rake features if test -z "$TRAVIS"; then
PROFILE="--format pretty"
else
PROFILE="--format progress"
fi
bundle exec cucumber $PROFILE "$@"

View File

@ -2,16 +2,19 @@
# #
# Usage: # Usage:
# script/test # script/test
# script/test <hi> # script/test <test_file>
set -x
if [ -z "$1" ]; then if [ -z "$1" ]; then
TEST_FILES="test/test_*.rb" TEST_FILES="./test/test_*.rb"
else else
TEST_FILES="$@" TEST_FILES="$@"
fi fi
RAKE_LIB_DIR=$(ruby -e "puts Gem::Specification.find_by_name('rake').gem_dir + '/lib'")
set -x set -x
bundle exec rake test time bundle exec ruby -I"lib:test" \
-I"${RAKE_LIB_DIR}" \
"${RAKE_LIB_DIR}/rake/rake_test_loader.rb" \
$TEST_FILES