[openstreetmap/openstreetmap-website] Refactor diary tests (#1285)

Andy Allan notifications at github.com
Thu Sep 15 09:52:22 UTC 2016


Ugh, implicit tests. Testing negatives are bad enough (just as likely to have an incorrect test as to be successfully testing that something is missing), but implicit ones are the worst. Due to the fixtures our tests are full of implicit negatives.

I'll fix these though, update soon.

In general, our tests have too high ratio of assertions to tests, so it's very hard to discern that e.g. "test_list_user" is supposed to both test that particular things show, and also that other things aren't. But it's nowhere near as bad as e.g. test_new, which crams 5 different tests (even needs comments to delineate them) and 40 assertions into one MegaTest(tm). But I'm trying to avoid biting off too much at once.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1285#issuecomment-247285490
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160915/fd022ed0/attachment.html>


More information about the rails-dev mailing list