File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ chruby_sh=" ${0%/* } /../share/chruby/chruby.sh"
4+ source " $chruby_sh "
5+
36case " $1 " in
47 -h|--help)
58 echo " usage: chruby-exec RUBY [RUBYOPTS] -- COMMAND [ARGS...]"
@@ -31,7 +34,6 @@ if (( $# == 0 )); then
3134 exit 1
3235fi
3336
34- chruby_sh=" ${0%/* } /../share/chruby/chruby.sh"
3537source_command=" command -v chruby >/dev/null || source $chruby_sh "
3638command=" $source_command ; chruby $( printf " %q " " ${argv[@]} " ) && $( printf " %q " " $@ " ) "
3739
Original file line number Diff line number Diff line change @@ -21,4 +21,13 @@ function test_chruby_exec()
2121 assertEquals " did change the ruby" " $test_ruby_version " " $ruby_version "
2222}
2323
24+ function test_chruby_exec_with_version()
25+ {
26+ local output=$( chruby-exec --version)
27+
28+ assertEquals " did not output the correct version" \
29+ " chruby version $CHRUBY_VERSION " \
30+ " $output "
31+ }
32+
2433SHUNIT_PARENT=$0 . $SHUNIT2
You can’t perform that action at this time.
0 commit comments