Posts tagged "tests"

Experimenting with explicit contracts with Ruby

A few months back, José Valim started a conversation on overusing mocks and coupling between components. That made me interested on revisiting how I design my code and it has changed my approach to testing a bit in one of our current Ruby projects. A Tale of Two Adapters Back in November, I worked on … »

How to setup CI to run Phoenix projects

Writing tests is an important step in software development and everyone knows the benefits. In our last post, we took a look on how to write acceptance tests in Phoenix and today we will see how to configure CI to run the tests. Install Erlang and Elixir We use Jenkins to run ours builds and … »

Writing Acceptance tests in Phoenix

Acceptance testing seems to be in its first steps in the Elixir ecosystem, but there are already some cool libs that can help us out to do it. I’m going to show you how we did it with Hound. In this blog post, we’ll write a few acceptance tests for an expenses report listing page, … »

Mocks and explicit contracts

Our test tools often make it very easy to abuse mocks. This post provides some guidelines on using them properly by relying on explicit contracts.

Nobody told me Minitest was this fun

Ever since I started working with Ruby I have been using RSpec to test my apps and gems without giving minitest much thought. Recently I started a new non-Rails project and decided to give Minitest a try just for the fun of it. Migrating from one tool to another was refreshingly fun due to the … »

Improve your test readability using the xUnit structure

TL;DR: test quality is not just about verifying correctly whether your code works, it’s also about making your test easy to read and understand. You can do that by structuring your test using the four-phases xUnit standard. The 4 phases of a test: setup, exercise, verify and teardown People don’t write tests to be read, … »