Skip to content

Commit 3508e56

Browse files
committed
Add deubg
1 parent cbf8df9 commit 3508e56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/units/test_lib.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env ruby
22

33
require File.dirname(__FILE__) + '/../test_helper'
4+
require "fileutils"
45

56
# tests all the low level git communication
67
#
@@ -52,13 +53,12 @@ def test_commit_with_no_verify
5253

5354
# Adds a pre-commit file that should throw an error
5455
create_file(pre_commit_path, <<~PRE_COMMIT_SCRIPT)
55-
#!/bin/bash
56+
#!/bin/sh
5657
echo "pre-commit script exits with an error"
5758
exit 1
5859
PRE_COMMIT_SCRIPT
5960

60-
create_file(pre_commit_path, 'echo Pre-commit file. Shoud not execute; exit 1') # Error when executed
61-
File.chmod(0111, pre_commit_path)
61+
FileUtils.chmod("+x", pre_commit_path)
6262

6363
create_file("#{@wdir}/test_file_2", 'content test_file_2')
6464
@lib.add('test_file_2')

0 commit comments

Comments
 (0)