From 77fc55a55df0e78c5ed43d47037ed8e204f25475 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 3 Jan 2015 17:35:45 +0800 Subject: git-flow: add test Closes #35504. Signed-off-by: Mike McQuaid --- Library/Formula/git-flow.rb | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/git-flow.rb b/Library/Formula/git-flow.rb index 21c7a82d8..f1a093075 100644 --- a/Library/Formula/git-flow.rb +++ b/Library/Formula/git-flow.rb @@ -1,33 +1,36 @@ -require 'formula' - class GitFlow < Formula - homepage 'https://github.com/nvie/gitflow' + homepage "https://github.com/nvie/gitflow" # Use the tag instead of the tarball to get submodules - url 'https://github.com/nvie/gitflow.git', :tag => '0.4.1' + url "https://github.com/nvie/gitflow.git", :tag => "0.4.1" head do - url 'https://github.com/nvie/gitflow.git', :branch => 'develop' + url "https://github.com/nvie/gitflow.git", :branch => "develop" - resource 'completion' do - url 'https://github.com/bobthecow/git-flow-completion.git', :branch => 'develop' + resource "completion" do + url "https://github.com/bobthecow/git-flow-completion.git", :branch => "develop" end end - resource 'completion' do - url 'https://github.com/bobthecow/git-flow-completion/archive/0.4.2.2.tar.gz' - sha1 'd6a041b22ebdfad40efd3dedafd84c020d3f4cb4' + resource "completion" do + url "https://github.com/bobthecow/git-flow-completion/archive/0.4.2.2.tar.gz" + sha1 "d6a041b22ebdfad40efd3dedafd84c020d3f4cb4" end - conflicts_with 'git-flow-avh' + conflicts_with "git-flow-avh" def install system "make", "prefix=#{libexec}", "install" - bin.write_exec_script libexec/'bin/git-flow' + bin.write_exec_script libexec/"bin/git-flow" - resource('completion').stage do + resource("completion").stage do bash_completion.install "git-flow-completion.bash" zsh_completion.install "git-flow-completion.zsh" end end + + test do + system "git", "flow", "init", "-d" + assert_equal "develop", shell_output("git rev-parse --abbrev-ref HEAD").strip + end end -- cgit v1.2.3