From a672b0a692f54a7e10b1ce564380b8fe382b0b92 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 13 Jun 2013 08:16:26 +0200 Subject: [PATCH] Helper script to execute easier local browser tests. --- script/local_browser_tests.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 script/local_browser_tests.sh diff --git a/script/local_browser_tests.sh b/script/local_browser_tests.sh new file mode 100755 index 000000000..2a54c6fc6 --- /dev/null +++ b/script/local_browser_tests.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +while true; do + read -p "Do you wish to drop database ane execute all browser tests?" yn + case $yn in + [Yy]* ) echo "Start tests..."; break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done + +bundle install + +rm -rf tmp/cache/file_store + +rake db:drop +rake db:create +rake db:migrate +rake db:seed + +thin start --threaded -d -p 4444 + +sleep 15 + +rake test:browser["BROWSER_URL=http://localhost:4444"] + +thin stop +