The Syntax of Taste: Refactoring Conditionals
How to Set Up Continuous Deployment with Ninefold
The Ruby Ecosystem for New Rubyists
Automatically Reload All the Things with Guard
What You Don’t Get With ActiveJob
Write Modular RSpec
Ruby Benchmarking Lessons Learned
The Basics of Capybara and Improving Your Tests
Capybara is a web-based automation framework used for creating functional tests that simulate how users would interact with your application. Today, there are many alternatives for web-based automation tools, such as Selenium, Watir, Capybara, etc. All of these tools have the same purpose, but there are slight differences that make each of them more or less suitable.
The main characteristic that developers are aiming for is the ability to have tests that are modular, easy to write, and easy to maintain. This is especially true in Agile/TDD environments where writing tests is second nature. These tests are expected to give good and fast feedback on code quality. As time goes by, the number of tests grows and it can be a real nightmare to maintain the tests, especially when the tests are not modular and simple enough.
In this tutorial, I will describe some of Capybara key features and explain why it could be your tool of choice for developing web-based automated tests.
Golden Master: Discovering Abstractions
Golden Master Testing: Controller Refactoring
Golden Master Testing: Refactor Complicated Views
Make Your Ruby Tests Cleaner with Minitest and Shoulda
Digging with TracePoint
Crafting Ruby for Performance
A Refactoring Workout: Relentlessly Green
Reading Ruby for Professional Development
BDD: Think Like an Actor
Make no bones about it, BDD ain't easy! It's actually darn-right difficult and takes time to master and do it right. Luckily, the benefits far outweigh the initial costs. If you've decided to practice BDD then you've already made a conscious decision to break the 'burn-and-scrape' cycle, a wise choice indeed!
Still, good intentions alone are not always enough. Many developers become disillusioned and frustrated with a process that doesn't seem to work for them. In this article, I'd like to explore some of the most common obstacles and pitfalls that fresh BDD adopters encounter and offer some tips to help overcome them.