ExAws.CloudSearch: CloudSearch Service Module for ExAws (0.2) Railsy Model Helpers for Ecto

How to do Outside-In TDD with Phoenix

Elixir/Phoenix is pure functional compare to Ruby/Rails, the basic building blocks (Plugs) are just functions, which would be super easy to unit test. Though there were some blog posts demonstrating how to mock Context in ConnTest using Mox, there were almost no resources teaching how to unit test a Phoenix controller (calling controller functions directly in test cases).

This post’s main purpose is to fill that gap and explain the full TDD cycle developing a new feature.

How to do Outside-In TDD with Phoenix - dsdshome

Shameless plug: Check out @elixirstatus' other community project:

Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.