
paulanthonywilson
Elixir mock (test double) testing seams: a modest proposal
When using mocks in Elixir, particularly with Mox then the standard way of loading the implementation is along the lines of Application.get_env(:cat_facts, CatFacts.CatFactsApi, CatFacts.RealCatFactsApi)
. In this post I suggest an alternative which is a little less flexible, but also safer and avoid extra configuration.
Popular Backend topics
New
New

The Race to Replace C & C++.
Three expert compiler writers sit down to discuss moving beyond C and C++
This thread...
New

What’s Next for Teal, the typed dialect of Lua - FOSDEM 2021.
This is my talk about the latest updates on the Teal programming language,...
New

I’ve spent the last year building keyboards, which has included writing firmware for a variety custom circuit boards.
I initially wrote ...
New

I discovered Elixir and Go at about the same time (2019). I had pivoted almost eight years of working as a Java developer, and part of me...
New

I don’t like reading thick O’Reilly books when I start learning new programming languages. Rather, I like starting by writing small and d...
New

A long time ago, I wrote an article about The Asymmetry of ++, thanks to
Fede Bergero’s findings. Let’s add a few more asymmetries to th...
New

Episode 299 - 10 Tips and Tricks.
I don’t get around to doing these too often, but they are always a lot of fun. In this episode, we’ll ...
New

Mark Hoffman, the author of Programming WebAssembly in Rust, is a pretty hilarious lecturer if you like a dry sense of humor.
New
Other popular topics

Hello Devtalk World!
Please let us know a little about who you are and where you’re from :nerd_face:
New

I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New

I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New

In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first:
asdf plugin-upd...
New

Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New

This is going to be a long an frequently posted thread.
While talking to a friend of mine who has taken data structure and algorithm cou...
New

The overengineered Solution to my Pigeon Problem.
TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New

Will Swifties’ war on AI fakes spark a deepfake porn reckoning?
New

A Brief Review of the Minisforum V3 AMD Tablet.
Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New

Hello,
I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /svelte
- /typescript
- /crystal
- /c-plus-plus
- /kotlin
- /tailwind
- /gleam
- /ocaml
- /react
- /flutter
- /elm
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /zig
- /scala
- /textmate
- /sublime-text
- /nixos
- /debian
- /lisp
- /agda
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /django
- /spring
- /diversity
- /nodejs
- /lua
- /slackware
- /julia
- /c
- /markdown