aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/rbenv.rb
diff options
context:
space:
mode:
authorXu Cheng2015-02-03 20:08:28 +0800
committerMike McQuaid2015-02-03 16:20:42 +0000
commita1274f07faaefe4762831cc6903194a18e022c55 (patch)
tree15dc6d1cb59137f85aa0e61c7a64b358c5de41ba /Library/Formula/rbenv.rb
parent9b9c6e954776ff2fe079841a643d577843d85100 (diff)
downloadhomebrew-a1274f07faaefe4762831cc6903194a18e022c55.tar.bz2
modernize and add test for rbenv and its family
Closes #36496. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/rbenv.rb')
-rw-r--r--Library/Formula/rbenv.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/Library/Formula/rbenv.rb b/Library/Formula/rbenv.rb
index b19bbd76f..cc84a7e85 100644
--- a/Library/Formula/rbenv.rb
+++ b/Library/Formula/rbenv.rb
@@ -1,15 +1,13 @@
-require 'formula'
-
class Rbenv < Formula
- homepage 'https://github.com/sstephenson/rbenv'
- url 'https://github.com/sstephenson/rbenv/archive/v0.4.0.tar.gz'
- sha1 '825ceec55805b8bb80a6d6003fd3cef824d7ff14'
+ homepage "https://github.com/sstephenson/rbenv"
+ url "https://github.com/sstephenson/rbenv/archive/v0.4.0.tar.gz"
+ sha1 "825ceec55805b8bb80a6d6003fd3cef824d7ff14"
- head 'https://github.com/sstephenson/rbenv.git'
+ head "https://github.com/sstephenson/rbenv.git"
def install
- inreplace 'libexec/rbenv', '/usr/local', HOMEBREW_PREFIX
- prefix.install Dir['*']
+ inreplace "libexec/rbenv", "/usr/local", HOMEBREW_PREFIX
+ prefix.install Dir["*"]
end
def caveats; <<-EOS.undent
@@ -20,4 +18,8 @@ class Rbenv < Formula
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
EOS
end
+
+ test do
+ shell_output("eval \"$(#{bin}/rbenv init -)\" && rbenv versions")
+ end
end