Open JeanMertz opened 10 years ago
Make sure that you exported HOME
, so the bash process that runs chruby also runs in an test home directory.
granted, I haven't run these tests yet, only the fish-equivalent
But would the HOME path matter in this case? $test_project_dir
lives outside of the test HOME and even if it did, HOME
doesn't have to be a root path. For example:
$ cat /Users/Jean/.ruby-version
1.9
$ echo $HOME
/Users/Jean/code/oss/chruby-fish/test/home
# the below is hypothetical, since the test actually looks in test/project/.ruby-version
$ cat /Users/Jean/code/oss/chruby-fish/test/home/.ruby-version
2.1
$ cd /Users/Jean/code/oss/chruby-fish/test/home/.ruby-version
$ chruby_auto
2.1
$ cd ..
$ chruby_auto
1.9
chruby_auto
doesn't stop at $HOME
/~
, it goes all the way to /
, doesn't it?
@JeanMertz ah ha, I see what you mean. Perhaps chruby_auto
should respect $PREFIX
and stop once it reaches the $PREFIX
.
@postmodern looking at this test:
https://github.com/postmodern/chruby/blob/master/test/chruby_auto_test.sh#L102-L109
it seems (I haven't tested this in
chruby
yet, but I am seeing this result in mychruby-fish
wrapper) that this test will fail if you have the repo installed somewhere that has a.ruby-version
file somewhere in the directories above.Not really sure what to do about it, except running the test from somewhere other than your home directory.
Just a heads-up.