shut up when no script/hooks dir, but there is a .git dir

This commit is contained in:
John Bintz 2012-08-02 12:18:33 -04:00
parent 3761c79d25
commit b29794152f
4 changed files with 16 additions and 1 deletions

View File

@ -40,6 +40,15 @@ Feature: CLI
When I run "bin/penchant gemfile remote" in the "tmp" directory When I run "bin/penchant gemfile remote" in the "tmp" directory
Then the output should include "git hooks not installed" Then the output should include "git hooks not installed"
Scenario: Run in a project where there are no git hooks, but there is a git repo
Given I have the file "tmp/Gemfile.penchant" with the content:
"""
gem 'rake'
"""
Given I have the directory "tmp/.git"
When I run "bin/penchant gemfile remote" in the "tmp" directory
Then the output should not include "git hooks not installed"
Scenario: Run in a project where git hooks are set up Scenario: Run in a project where git hooks are set up
Given I have the file "tmp/Gemfile.penchant" with the content: Given I have the file "tmp/Gemfile.penchant" with the content:
""" """

View File

@ -0,0 +1,3 @@
Given /^I have the directory "(.*?)"$/ do |dir|
FileUtils.mkdir_p dir
end

View File

@ -13,6 +13,9 @@ module Penchant
return false if !File.expand_path(File.readlink(target)) == File.expand_path(file) return false if !File.expand_path(File.readlink(target)) == File.expand_path(file)
end end
true
else
# no script/hooks dir, so we must not want them
true true
end end
end end

View File

@ -1,3 +1,3 @@
module Penchant module Penchant
VERSION = "0.2.14" VERSION = "0.2.15"
end end