Skip to content

Commit 24f2b62

Browse files
SMillerDevBrewTestBot
authored andcommitted
pyenv: specify bin in test
1 parent 174762f commit 24f2b62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Formula/pyenv.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def install
5656

5757
test do
5858
# Create a fake python version and executable.
59-
pyenv_root = Pathname(shell_output("pyenv root").strip)
59+
pyenv_root = Pathname(shell_output("#{bin}/pyenv root").strip)
6060
python_bin = pyenv_root/"versions/1.2.3/bin"
6161
foo_script = python_bin/"foo"
6262
foo_script.write "echo hello"
@@ -65,13 +65,13 @@ def install
6565
# Test versions.
6666
versions = shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
6767
"&& eval \"$(#{bin}/pyenv init -)\" " \
68-
"&& pyenv versions").split("\n")
68+
"&& #{bin}/pyenv versions").split("\n")
6969
assert_equal 2, versions.length
7070
assert_match(/\* system/, versions[0])
7171
assert_equal(" 1.2.3", versions[1])
7272

7373
# Test rehash.
74-
system "pyenv", "rehash"
74+
system bin/"pyenv", "rehash"
7575
refute_match "Cellar", (pyenv_root/"shims/foo").read
7676
assert_equal "hello", shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
7777
"&& eval \"$(#{bin}/pyenv init -)\" " \

0 commit comments

Comments
 (0)