foodsoft/bin/test
2015-05-02 14:34:13 +02:00

17 lines
416 B
Bash
Executable file

#!/bin/sh
# We use TEST_DATABASE_URL to make sure we don't accidentaly overwrite dev/prod db
unset DATABASE_URL; export DATABASE_URL
[ "$TEST_DATABASE_URL" ] && export DATABASE_URL="$TEST_DATABASE_URL"
export RAILS_ENV=test
# Start virtuals X environment to allow integration testing via firefox/iceweasel
export DISPLAY=:99
Xvfb $DISPLAY -nolisten tcp &
XVFB_PID=$!
# Start tests
rspec
# Cleanup
kill $XVFB_PID