diff --git a/cmd/kelpie/mock.go.tmpl b/cmd/kelpie/mock.go.tmpl index 1a7e26b..c791c6f 100644 --- a/cmd/kelpie/mock.go.tmpl +++ b/cmd/kelpie/mock.go.tmpl @@ -59,7 +59,7 @@ type Instance struct { {{- range $method := .Methods }} func (m *Instance) {{ $method.Name }}({{ template "parameterWithTypeList" $method.Parameters }}){{ if $method.Results }} ({{ template "resultWithTypeList" $method.Results }}){{ end }} { - expectation := m.mock.Call("{{ $method.Name }}", {{ template "parameterList" $method.Parameters }}) + expectation := m.mock.Call("{{ $method.Name }}"{{ if $method.Parameters }}, {{ template "parameterList" $method.Parameters }}{{ end }}) if expectation != nil { if expectation.ObserveFn != nil { observe := expectation.ObserveFn.({{ template "observationCallback" $method }}) diff --git a/examples/mocks/accountservice/accountservice.go b/examples/mocks/accountservice/accountservice.go index cd15644..d57bafb 100644 --- a/examples/mocks/accountservice/accountservice.go +++ b/examples/mocks/accountservice/accountservice.go @@ -62,7 +62,7 @@ func (m *Instance) DisableAccount(id uint) { } func (m *Instance) DisabledAccountIDs() (r0 []uint) { - expectation := m.mock.Call("DisabledAccountIDs", ) + expectation := m.mock.Call("DisabledAccountIDs") if expectation != nil { if expectation.ObserveFn != nil { observe := expectation.ObserveFn.(func() []uint)