diff options
| author | Xu Cheng | 2015-01-03 17:35:45 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-03 18:43:01 +0000 |
| commit | 77fc55a55df0e78c5ed43d47037ed8e204f25475 (patch) | |
| tree | 4a5651a93188904cf4c7b13aed38327e0be3c943 /Library/Formula/git-flow.rb | |
| parent | bb09b1fc40114fc2c83594901c99cd5e9329d4fe (diff) | |
| download | homebrew-77fc55a55df0e78c5ed43d47037ed8e204f25475.tar.bz2 | |
git-flow: add test
Closes #35504.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/git-flow.rb')
| -rw-r--r-- | Library/Formula/git-flow.rb | 29 |
1 files changed, 16 insertions, 13 deletions
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 |
