Using Minitest::Spec in Rails? Watch out for the lifecycle hooks!
A small mistake sent me on an overly long investigation into Minitest hooks, and how Rails integrates with these.
Read this essay →More Minitest::Spec shenanigans
While I already covered the basics of `Minitest::Spec`, I forgot to discuss a few aspects of the spec flavor. This post serves as a complement to the previous one and digs a bit deeper into some extra `Minitest::Spec` shenanigans.
Read this essay →What is Minitest::Spec?
In my previous post, I talked a lot about how Minitest comes in various syntax flavors. One flavor I did not cover much is Minitest's spec extension.
Read this essay →Lost in Minitest? Start here!
I have a confession to make: I have never used Minitest in the seven years I've been a professional programmer. Lured by the promise of speed and wide adoption, I decided to try Minitest. Then I hit an unexpected roadblock.
Read this essay →Speed up RSpec tests: understand lifecycle and execution
One of RSpec's strengths is the legibility of its behavior-based DSL. The other side of this coin is that the proliferation of small example blocks introduces a performance overhead.
Read this essay →How to test your Rails models with RSpec
Today, I want to share how to test your Rails models with RSpec. Testing your models is a no-brainer strategy when building your applications. It gives you the confidence to make changes without regressions. We'll cover the fundamental testing strategies with RSpec's built-in features. And for fun, we'll check some extra tools to amp up your models' coverage.
Read this essay →Introduction to RSpec: the syntax
In this second part of my introduction to RSpec, I want to focus on the syntax. Here's a glossary of the keywords you'll use the most when testing with RSpec: describe, subject, let vs let!, it, context, etc...
Read this essay →An introduction to RSpec: how to install RSpec, naming convention and basic files structure
When you start programming, it's not easy to know what to test, how to test, and why should you test? So let's start with an introduction to RSpec: how to install RSpec, RSpec naming convention and and RSpec files structure.
Read this essay →Testing railway-oriented business transactions with Rspec
Railway-oriented business transactions are a great way to unclutter your Rails controllers. But how should we test them? Let's get down to it.
Read this essay →