Created
November 11, 2010 06:08
-
-
Save ammar/672097 to your computer and use it in GitHub Desktop.
A quick and dirty solution to run my specs through multiple ruby versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Poor man's multiruby, a wrapper bash function/script around rvm. This is | |
# used to run all the specs through all the supported versions of ruby. | |
# | |
# Requires that all the rubies listed below are installed via rvm, and rvm to | |
# be sourced in the environment. | |
# | |
# rvm install ${version}; | |
# | |
# To install the required gems, run the following: | |
# | |
# gem install rspec builder json nokogiri; | |
multispec() { | |
versions=('1.8.6' '1.8.7' '1.9.1' '1.9.2') | |
echo "Running specs for ${#versions[@]} ruby versions" | |
echo "------------------------------------------------------------" | |
for version in ${versions[@]} | |
do | |
rvm ${version} | |
echo `ruby --version` | |
time ./spec-one ${version:0:3} > ${version}.run 2> ${version}.run | |
echo | |
tail -n 1 ${version}.run | |
echo "------------------------------------------------------------" | |
done | |
} | |
multispec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment