Testing is where we spend most of our time as developers. Good testing raises the quality of software, reduces bugs and, in the long run, makes our work easier. In this article, we’ll discuss the basics of testing with Ruby on Rails: What is BDD? How to test models in Rails? How to test business […]
Ilija Eftimov

Testing Mixins in Isolation with Minitest and RSpec
Introduction Mixins are a very powerful feature in Ruby, but knowing how to test them is sometimes not too obvious, especially to beginners. This stems from mixins’ nature – they get mixed into other classes. In this tutorial, we will revisit what mixins are, identify mixin types, and learn how we can test mixins with […]
Stubbing External Services in Rails
Intro Integrating external services in web applications has been around for a long time now. We often use various OAuth providers such as Facebook, Twitter, GitHub and other alternatives for user signup, depending on our needs. Other times, things are more complicated. Maybe we are using Stripe or PayPal for online payments, or maybe we […]
Getting Started with Minitest
What is Minitest? Minitest is a testing tool for Ruby that provides a complete suite of testing facilities. It also supports behaviour-driven development, mocking and benchmarking. With the release of Ruby 1.9, it was added to Ruby’s standard library, which increased its popularity. Even though at first it gives off the impression of a very […]