Latest #mox Threads Top

ArthurMmn
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
alexisruccius
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
herman
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
D4no0
I seem to be getting some strange undefined behavior when defining multiple separated mocks for the same module in the same test: Http...
New
mudasobwa
The goal of this library is to make planting better testing into a source code as smoothly and fluently as possible. It’s barely needed ...
New
ream88
I recently encountered an issue where a partial or functional component was re-rendered multiple times, resulting in an inline function c...
New
yeroc
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
LauraBeatris
Hey everyone, I would like some guidance on how to abstract my current logic around mocking Tesla HTTP requests, using the mox library. ...
New
michaelfich
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
newelixiruser
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

This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

ArthurMmn
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
alexisruccius
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 Top

ream88
I recently encountered an issue where a partial or functional component was re-rendered multiple times, resulting in an inline function c...
New
LauraBeatris
Hey everyone, I would like some guidance on how to abstract my current logic around mocking Tesla HTTP requests, using the mox library. ...
New
michaelfich
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
herman
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
katafrakt
Suppose I have a code like this: defmodule Spy do @analytics Application.compile_env!(:spy, :analytics) def create_article(params) ...
New
newelixiruser
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
robbplo
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
mudasobwa
The goal of this library is to make planting better testing into a source code as smoothly and fluently as possible. It’s barely needed ...
New
D4no0
I seem to be getting some strange undefined behavior when defining multiple separated mocks for the same module in the same test: Http...
New
yeroc
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 Top

Fl4m3Ph03n1x
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
Fl4m3Ph03n1x
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
adamu
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
doodloo
Consider the following scenario: A Normalizer behaviour with a normalize_email function. A User module, with a changeset function that ...
New
mariosangiorgio
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
jrhite
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
woohaaha
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
Fl4m3Ph03n1x
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
seanhandley
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
peoj
Hi all, I have a simple GenServer that performs some initialisation on start. That initialisation process involves making some calls to...
New
xgeek116
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
micah
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
Mpanarin
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
Fl4m3Ph03n1x
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
msz
I’m a big fan of rigorous unit testing. I believe most slow integrated tests can be replaced by unit tests using mocks, provided that one...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement