From 73c0232145b523aaa35b1bf805f1959bbd16b62b Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 28 Nov 2015 02:03:55 +0900 Subject: [PATCH] Add local bin to test all rubies --- bin/test | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bin/test diff --git a/bin/test b/bin/test new file mode 100755 index 00000000..2fcd1ca2 --- /dev/null +++ b/bin/test @@ -0,0 +1,24 @@ +#!/bin/bash + +VERSIONS=( + 2.0.0 + 2.1.7 + 2.2.3 +) + +set -e +trap 'echo "${VERSIONS[2]}" > .ruby-version' 0 + +function test_with() { + version=$1 + rbenv local $version + if ! bundle check > /dev/null; then + bundle install + fi + ruby -v + rake test +} + +for version in ${VERSIONS[@]}; do + test_with $version +done