
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

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

Just wrote a short post, more a memo to myself, but maybe someone find it useful :stuck_out_tongue:
https://dwarfte.ch/2021/02/03/giving...
New

Idioms for the D Programming Language
This thread was posted by one of our members via one of our news source trackers.
New

The run-time speed and memory usage of programs written in Rust should about the same as of programs written in C, but overall programmin...
New

PHP 8.1 is already taking shape quite well, yet there’s one feature I’d love to see added, that’s still being discussed: multi-line short...
New

Includes talk about concurrency and performance topics:
New

We take a deeper dive with Nathan Long into IOLists in Elixir. We cover what they are, how they work, the power they have when concatenat...
New

Tej Pochiraju joins the mix to discuss Progressive Web Apps and how you can support them using Elixir and Phoenix to control IoT devices....
New

In episode 92 of Thinking Elixir, we talk with Mitchell Hanberg and learn about why he created the alternate Phoenix templating language ...
New

In building lofi.limo, media storage and distribution naturally came up. I have songs, announcements, and background image loops which I ...
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’ve been really enjoying obsidian.md:
It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New

SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New

I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New

Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New

Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New

Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New

Author Spotlight
Jamis Buck
@jamis
This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New

I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New

I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc.
However, I don’t...
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
- /kotlin
- /c-plus-plus
- /tailwind
- /gleam
- /ocaml
- /react
- /elm
- /flutter
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /html
- /deepseek
- /zig
- /scala
- /sublime-text
- /lisp
- /textmate
- /debian
- /nixos
- /react-native
- /agda
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /django
- /manjaro
- /spring
- /nodejs
- /diversity
- /lua
- /c
- /julia
- /slackware
- /markdown