This Week's Trending
This Month's Trending
This Year's Trending
I have a behaviours with lots of functions. Each pass an arguments and an optional keyword list of options. And I found myself in this we...
New
I recently ran into a tricky error while testing a GenServer that uses a mock in its init/1.
Maybe this helps others, or maybe someone h...
New
Last Three Year's Trending
I recently encountered an issue where a partial or functional component was re-rendered multiple times, resulting in an inline function c...
New
Hey everyone, I would like some guidance on how to abstract my current logic around mocking Tesla HTTP requests, using the mox library.
...
New
I’ve been working with a function that looks similar to the one that I’ve described below. It works adequately in practice but trying to...
New
I have seen some good examples for best practices in sharing test suites:
Test a module for a given behaviour
Test a behaviour that use...
New
Suppose I have a code like this:
defmodule Spy do
@analytics Application.compile_env!(:spy, :analytics)
def create_article(params) ...
New
Hi,
I’m trying to test my config settings.
To do that, i use a module that load them: like this
defmodule App.SettingsBehaviour do
@...
New
I ran into this issue the other day and it’s been bugging me ever since. Below is a basic behaviour/implementation, and function which re...
New
I seem to be getting some strange undefined behavior when defining multiple separated mocks for the same module in the same test:
Http...
New
Hi all! Deleted the previous post, formatting was very messed up. Apologies!
I’ve got some Mox tests working with some API functions, bu...
New
Trending Over Three Years
Background
I have a small app where I have a pool that creates several workers. The pool acts as a supervisor for said workers.
Both (th...
New
Background
I have library that uses HTTPoison for some functionality I need to test. To achieve this I am using Mox, which I believe is t...
New
I’m trying to use Mox to test a fix to a DateTime bug in my app.
The bug was that I was subtracting 1 from the current hour, which was f...
New
Consider the following scenario:
A Normalizer behaviour with a normalize_email function.
A User module, with a changeset function that ...
New
I am working on a Phoenix application that also uses a GenServer to fetch some data from a third party API on startup and periodically to...
New
I’m new to elixir and am seeing confusing/undesirable behavior when using Mox.
I just want to use a mock for a single test module. Let’s...
New
I cannot seem to get Mox to work for my Accounts module. Here is sort of the code.
# test_helper.exs
ExUnit.start(exclude: [:skip])
Mox...
New
Background
I have a small app with a pool manager, a couple workers and a registry.
For the sake of learning Mox, I made a small test th...
New
While writing mocks for an Elixir test suite, I found that mock_with sets up a global mock object which prevents you from safely being ab...
New
Hi all,
I have a simple GenServer that performs some initialisation on start. That initialisation process involves making some calls to...
New
I’m using using mox to help me with my unit testing (for now, I want to mock a function that fetches external API).
my mix.exs :
{:mox,...
New
Hello all! I’m in the process of writing an application with a couple moving parts, but unit testing it is making me question everything....
New
Hello!
So not so long ago I started learning Elixir (coming from python myself). To ease it up, I started a small project for myself(lin...
New
Background
I am trying to use Mox to replicate some simple interactions but I am failing test that should be passing (or so I think):
Co...
New
My app is making a bunch of API requests to a 3rd party and I’m writing integration tests, thus mocking responses with Mox.
The way I wr...
New
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
Sub Categories:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #ash-questions
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #exunit
- #discussion
- #javascript
- #elixirconf
- #library
- #oban-questions
- #dialyzer
- #docker
- #onsite
- #authentication
- #podcasts
- #full-time-contract
- #umbrella
- #code-sync
- #ecto-query
- #phoenix_html
- #iex
- #graphql
- #genstage
- #elixir-ls
- #nerves-questions
- #podcasts-by-brainlid
- #supervisor
- #websockets
- #distillery
- #advent-of-code
- #blog-post
- #livebook-questions
- #processes
- #forms
- #api
- #metaprogramming







