Re: wondering why spec.test/instrument doesn't check :ret

2016-08-07 Thread Tom Connors
Thank you both for the responses and links, they've been helpful. On Saturday, August 6, 2016 at 1:02:16 PM UTC-4, Tom Connors wrote: > > spec.test/instrument doesn't check the return value of spec'd functions > and according to the spec guide this is because we should be checking > function imp

Re: wondering why spec.test/instrument doesn't check :ret

2016-08-06 Thread Sean Corfield
> I'm sure this was considered Indeed, and when clojure.spec was first introduced, instrument did check :ret and :fn specs. That feature was deliberately removed and the reason for it is (paraphrased): * clojure.spec/instrument helps check that your functions are _called_ correctly * clo

Re: wondering why spec.test/instrument doesn't check :ret

2016-08-06 Thread Josh Tilles
I’m not sure it answers your question *directly*, but a quote from Rich in another thread seems relevant: On Monday, July 11, 2016 at 10:01:05 AM UTC-4, Rich Hickey wrote: > On Sunday, July 10, 2016 at 6:04:39 AM UTC-4, puzzler

wondering why spec.test/instrument doesn't check :ret

2016-08-06 Thread Tom Connors
spec.test/instrument doesn't check the return value of spec'd functions and according to the spec guide this is because we should be checking function implementations at testing time, not development time. It seems to me that adding :ret and :fn checks to instrumented functions would be worthwhi