skalnik/vim-vroom — pull request #18 by charlietanksley (2012-06-09 19:15:22+00:00)
Title: Add custom runner

This is a pretty serious reworking of some of the underpinnings to give some new functionality, but nothing from the outside has to change. You can see the code here, so I won't say too much about it. But here's an overview:

I rewrote the two main functions (vroom#RunTestFile() and vroom#RunNearestTest()) so that they take an optional argument, a dictionary. That dictionary can have two keys: 'runner' and 'options'. This lets me define a mapping like so:

```
nmap td :call vroom#RunTestFile({'runner':'spin serve'})
```

or, if I'd rather use Spork:

```
nmap td :call vroom#RunTestFile(('options':'--drb'})
```

You could also use a better Test::Unit runner:

```
nmap tD :call vroom#RunNearestTest(('runner':'m})
```

The rewritten functions are flexible enough to keep from changing the current api while still giving the flexibility that I wanted.

I moved a decent bit of stuff around, but I didn't mess with any of the option checking. So hopefully nothing is broken. :) I tested manually as much as I could, but I'm sure I didn't get everything.

I'm happy to rework things as needed, and I'd be fine if you think this is going the wrong direction. Thoughts?