wohali opened a new issue #708: couch_peruser_tests using wrong asserts
URL: https://github.com/apache/couchdb/issues/708
 
 
   From IRC:
   
   ```irc
   17:22 < chewbranca> Wohali: jan____: yeap confirmed: 
https://gist.github.com/chewbranca/e97917468d32bedd198c1f370be7915e
   17:22 < chewbranca> jan____: well it basically means that only the last test 
in the function is tested
   17:22 < chewbranca> you need to return a list of functions for generators
   17:25 < chewbranca> Wohali: jan____: for that module, basically just need to 
change things like this
                       
https://github.com/apache/couchdb/blob/e5f7de648c19b79ae665800aa36d657a02b682b6/src/couch_peruser/test/couch_peruser_test.erl#L230-L232
 to
                       return a list of those three asserts, rather than only 
returning the last one
   17:26 < chewbranca> ?_* is basically equivalent to fun() -> ?assert(...) end 
and provides delayed evaluation of the test
   17:26 <+jan____> chewbranca: or we turn them into directly executed asserts?
   17:28 < chewbranca> jan____: that could work too, but you'll need to switch 
more things around, because *_test_ instead of *_test makes a generator test
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to