Fork me on GitHub
#protorepl
<
2017-01-10
>
roelof12:01:51

Hello, I use spec for testing and as soon as I add this to my code: (stest/summarize-results (stest/check paintings2.api-get/get-data-detail-page))`

roelof12:01:18

then the proto-repl will not boot up properly.

roelof12:01:34

I have disabled all the refresh part in the settings already

roelof12:01:47

Anyone a idea how to make this work

robert-stuttaford13:01:39

@roelof wrap it in a function definition and call the function when you need to. proto-repl will reload all your code on connecting, which means it’ll run any top-level forms that Do Things

roelof13:01:36

@robert-stuttaford oke, so I cannot place only the (stest .... ) part

roelof13:01:18

I have to make some sort of function of it so put the (stest ) into a (def ..... )

roelof13:01:09

Thanks, It worked . When I do

(defn test-functions
 "all the test"
 []
 (stest/summarize-results (stest/check 'paintings2.api-get/get-objectNumbers))
 (stest/summarize-results (stest/check 'paintings2.api-get/get-art-object))
 (stest/summarize-results (stest/check 'paintings2.api-get/get-data-detail-page))
 (stest/summarize-results (stest/check 'paintings2.api-get/get-data-front-page))
 (stest/summarize-results (stest/check `paintings2.api-get/get-image-url))
 (stest/summarize-results (stest/check `paintings2.api-get/get-data-front-page-url))
 (stest/summarize-results (stest/check `paintings2.api-get/get-data-detail-page))) 

roelof13:01:37

I see this :

{:sym paintings2.api-get/get-objectNumbers}
{:sym paintings2.api-get/get-art-object}
{:sym paintings2.api-get/get-data-detail-page}
{:sym paintings2.api-get/get-data-front-page}
{:sym paintings2.api-get/get-image-url}
{:sym paintings2.api-get/get-data-detail-page}
paintings2.api-get=>
{:check-passed 1, :total 1}   

roelof13:01:43

so im happy now

roelof13:01:03

Thanks a lot

carocad14:01:07

@roelof check can test all your speced functions when called with no arguments so you can even avoid all those check calls 😉

roelof14:01:16

@carocad oke, so I have to do (stest/checks) ?

carocad14:01:54

(stest/summarize-results (stest/check)) should do the job

roelof14:01:06

oke, then I understand you well

roelof14:01:31

@carocad it;s not working. I see only this output

{:sym paintings2.api-get/get-objectNumbers}
{:sym paintings2.api-get/get-data-detail-page} 

roelof14:01:49

and then a spec is failing

roelof14:01:21

This needs more investigations , Also with the old code things are failing where this morning everything works well

carocad14:01:58

it should show you if the error is on your side

roelof14:01:32

oke, I think I found something , I will ask in the beginners channel for help