Introduction In this tutorial, we will learn how to test Ruby on Rails applications with Minitest. We’ll cover how to do use Minitest’s mocks and stubs to improve the performance of your tests. Once we understand how testing works, we’ll set up a Continuous Integration (CI) pipeline with Semaphore to speed up development. Prerequisites To […]
Heidar Bernhardsson
How to Deploy Rails Applications With Ansible, Capistrano and Semaphore
Introduction In this tutorial, we’ll cover how to create a server with Amazon Web Services, do configuration management with Ansible, deploy Rails applications with Capistrano, and how to do continuous integration with Semaphore. All the code from this tutorial is available in a repository on GitHub. If you get stuck, you can always compare it […]
5 Tips for More Effective Capybara Tests
Introduction In this article, we’ll cover five tips for writing effective Capybara tests, and how to use them with RSpec and Minitest. What is Capybara? Capybara is an acceptance test framework for web applications. It’s a common choice for end-to-end, acceptance, or integration testing in Rails applications. It allows developers to simulate a user on […]
Integration Testing Ruby on Rails with Minitest and Capybara
Introduction In this tutorial, we’ll cover how to do integration tests in Rails using Minitest and Capybara. We’ll also cover how integration tests can sometimes serve as a replacement for controller tests. Prerequisites To follow this tutorial, you’ll need to have Ruby installed along with Rails. This tutorial was tested using Ruby version 2.3.3, Rails […]
How to Test Rails Models with Minitest
Introduction In this tutorial, we will cover how to test Ruby on Rails models with the Minitest testing suite. After completing this tutorial, you will have learned the following: What to test in Rails models, How to test the various aspects of a Rails model, such as validations, associations, scopes, and extra business logic methods, […]