erikstmartin/go-testdb — pull request #12 by guregu (2014-08-14 06:48:16+00:00)
Title: SetExecWithArgsFunc() doesn't work properly after a Reset()

Hello, thanks for the cool library.

In my tests following this pattern:
```go
func TestSomething(t *testing.T) {
defer testdb.Reset()
testdb.SetExecWithArgsFunc(func(query string, args []driver.Value) (result driver.Result, err error) {
...
})
}

func TestAnotherThing(t *testing.T) {
defer testdb.Reset()
testdb.SetExecWithArgsFunc(func(query string, args []driver.Value) (result driver.Result, err error) {
...
})
}
```

I found that it would never 'overwrite' the execFunc after a reset and always use the first one defined. I suspect that the Go SQL library caches Conns or something. Either way, I found that I could fix my issues by having Reset() not make a new conn but modify the existing one.

I imagine that this doesn't show up in your tests because you open a new DB connection for each one. I would prefer to not have to do that, so this fix was very helpful to me.