2015-04-26 15:20:05 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-05-02 14:22:39 +02:00
|
|
|
# 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"
|
2015-04-26 15:20:05 +02:00
|
|
|
export RAILS_ENV=test
|
|
|
|
|
|
|
|
# Start virtuals X environment to allow integration testing via firefox/iceweasel
|
|
|
|
export DISPLAY=:99
|
2015-05-02 14:22:39 +02:00
|
|
|
Xvfb $DISPLAY -nolisten tcp &
|
|
|
|
XVFB_PID=$!
|
2015-04-26 15:20:05 +02:00
|
|
|
|
|
|
|
# Start tests
|
2019-02-23 13:55:14 +01:00
|
|
|
bundle exec rspec $@
|
2015-05-02 14:22:39 +02:00
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
kill $XVFB_PID
|