Fork me on GitHub
#clojure-spec
<
2017-04-02
>
mike_ananev11:04:22

Hi. if i have code (gen/sample (s/gen ::basic/string) 1000))), how i can reproduce the data generation? Where to put seed value?

gfredericks12:04:26

@mike1452 what are you using this for?

mike_ananev12:04:37

@gfredericks well, i want to have unit tests for my functions. I have bunch of specs for data, and i have specs for my fn's. I want to pass spec'ed data to spec'ed fns to write unit tests.

mike_ananev12:04:02

i found some solution

mike_ananev12:04:20

for spec'ed data i can

mike_ananev12:04:14

i know that (s/valid) here is unnecessary

mike_ananev12:04:35

and for spec'ed fn example.core/average i can

mike_ananev12:04:02

i wanted to have reproducible results in unit tests

didibus20:04:34

Question: Why is cat always used for args in an fdef?

didibus20:04:56

I've used tuple sometimes, and that works well, would it be incorrect to do so?