Is there a clean way of adding spec generators in test code that apply to a spec defined in another source file? For example, say I have the following under my main src/
directory:
(s/fdef my-func
:args (s/cat
:statement (partial instance? java.sql.PreparedStatement))
:ret bool?)
In order to do generative testing I will need a generator for the statement
argument, say one that generates mock statements, but I'd rather not mix test code with production nor make other projects that use this library also transitively pull down the test libraries.
So what I'm looking for is a convention to apply generators atop an existing spec without having to modify the source for that spec.