aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-04-23 20:54:56 +0200
committerMike McQuaid2015-04-24 18:20:24 +0100
commit9f87375abecba908a7f19033762d5c0ec04f899c (patch)
tree0521b185ad05446932e1dedeccf5aec78a404e60
parentc97f70161d0e203a7d3ce5b0317fb9db916a39ae (diff)
downloadhomebrew-9f87375abecba908a7f19033762d5c0ec04f899c.tar.bz2
git-ssh: basic test added
Closes #38982. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/git-ssh.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/Library/Formula/git-ssh.rb b/Library/Formula/git-ssh.rb
index a7e0bce57..6b9660f6f 100644
--- a/Library/Formula/git-ssh.rb
+++ b/Library/Formula/git-ssh.rb
@@ -1,18 +1,21 @@
-require 'formula'
-
class GitSsh < Formula
- homepage 'https://github.com/lemarsu/git-ssh'
- url 'https://github.com/lemarsu/git-ssh/archive/v0.2.0.tar.gz'
- sha1 'a3014db9ae65fcf135a5224a18313f40aa19c7d5'
+ homepage "https://github.com/lemarsu/git-ssh"
+ url "https://github.com/lemarsu/git-ssh/archive/v0.2.0.tar.gz"
+ sha256 "f7cf45f71e1f3aa23ef47cbbc411855f60d15ee69992c9f57843024e241a842f"
def install
# Change loading of required code from libexec location (Cellar only)
inreplace "bin/git-ssh" do |s|
- s.sub! /path = .*$/, "path = '#{libexec}'"
+ s.sub!(/path = .*$/, "path = '#{libexec}'")
end
# Install main script
bin.install "bin/git-ssh"
# Install required code into libexec location (Cellar only)
libexec.install Dir["lib/*"]
end
+
+ test do
+ assert_equal "#{bin}/git-ssh v#{version}",
+ shell_output("#{bin}/git-ssh -V").chomp
+ end
end