(name string, arg ...string)
| 19 | } |
| 20 | |
| 21 | func (m *MockCommandExecutor) Output(name string, arg ...string) ([]byte, error) { |
| 22 | args := m.Called(name, arg) |
| 23 | // Lida com o caso de a saída ser nil |
| 24 | if args.Get(0) == nil { |
| 25 | return nil, args.Error(1) |
| 26 | } |
| 27 | return args.Get(0).([]byte), args.Error(1) |
| 28 | } |
| 29 | |
| 30 | func TestGetGitInfo_InRepo(t *testing.T) { |
| 31 | mockExec := new(MockCommandExecutor) |