Skip Navigation
How to test without mocking
  • The author clearly doesn’t realize that they still mock in their examples. I understand the annoyance with mocking away the complexity, however.

    To address your second claim - doing IO in tests does not mean testing IO.

    I test my file interactions by creating a set of temporary directories and files, invoking my code, and checking for outcomes. That way I can write my expectation before my implementation. This doesn’t test IO, merely utilizes it. The structure in temp that I create is still a mock of an expected work target.

    Very similarly I recently used a web server running in another thread to define expectations of API client’s behavior when dealing with a very ban-happy API. That web server is a mock that allowed me to clearly define expectations of rate limiting, ssl enforcement (it is a responsibility of an API client to initialize network client correctly), concurrency control during OAuth refreshes etc., without mocking away complexities of a network. Even better, due to mocking like that I was able to tinker with my network library choice without changing a single test.

    Mocks in the general sense that author defined them are inevitable if we write software in good faith - they express our understanding and expectation of a contract. Good mocks make as few claims as possible, however. A networking mock should sit in the network, for example, lest it makes implied claims about the network transport itself.

  • Why do teeth don't regenerate?
  • Teeth cannot produce enamel. Enamel is not a living tissue and it was produced by cells outside of the tooth in a coral-like manner. In order to grow a new tooth, you need it to be fully surrounded by specialized living tissue for the whole growth cycle.

    PS: I honestly expected something like this to come out of bioelectric computation research, but progress seems slower there. Or rather knowledge and techniques in other fields is reaching critical mass, giving us these advances.

  • Denmark Will Allow Ukraine To Fly Its F-16s Into Russia Proper
  • I'm not sure if you're calling Putin a stupid man that is easily manipulated or incompetent.

    They are parroting Russian propaganda. The one where “the west” is stipid, cunning, strong, and rotting all at the same time.

  • Locked Deleted
    *Permanently Deleted*
  • Genocide is not a numbers competition. Fucking get lost with that narrative.

    Convention on the Prevention and Punishment of the Crime of Genocide is literally four pages long, with barely 30% fill. It takes less than 10 minutes to read it fully. It takes one minute to get to the part that you directly contradict.

  • Norway has some surprising stats
  • You’re telling on yourself by claiming those peppers to be unavailable in Europe. I wouldn’t be surprised if you thought cilantro to be exclusively American at this point.

  • Dutch woman, 29, granted euthanasia approval on grounds of mental suffering
  • Giving the life the middle finger is the ultimate expression of freedom.

    Some people don’t care to continue living, some people face a mental decline that will destroy the lives of their loved ones, some are in constant pain, the list goes on.

    Forcing them to keep on living is torture. Unfortunately some people are incapable of compassion and stick to medieval concepts of propriety devised to keep the serfs working.

    It might be surprising to you, but there’s no beauty in suffering.

  • Family shareable pro option

    Hello,

    Is Avelon pro upgrade family shareable? If not, would it perchance be possible to introduce a family pro option at a higher price?

    According to Apple documentation, family sharing can be enabled on individual IAPs.

    Thanks.

    2
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)SL
    Slotos @feddit.nl
    Posts 1
    Comments 217