Articles tagged rspec
Is your testing strategy too top-heavy? Here are some techniques to spread coverage down the testing pyramid.
(June 01, 2024)
Artificial intelligence hasn't replaced us yet, but how does it handle the boring parts of our jobs?
(March 13, 2024)
Here's a short, neat trick to help save time when updating RSpec specs to reflect new test data.
(December 07, 2023)
How ChatGPT, GitHub Copilot, and TDD made me a professional Go programmer in less than an hour. Kind of.
(June 26, 2023)
If you're like me and don't need to test log output on a regular basis, you may not find the solutions to be immediately obvious. Here are two ways (that I know of) to approach the problem.
(August 10, 2020)
Nobody likes an intermittently failing test. Here's one way to keep your test suite running green, even when a test sometimes fails.
(June 08, 2020)
Sometimes, TDD gets in the way, does more to confuse than guide, or generally just slows development to a monotonous crawl. Here's a set of five go-to strategies I use to get out of test-fueled frustration, and back to productivity.
(July 09, 2019)
Many developers strive for 100% test coverage in their Rails applications, but what does that mean? And does it matter? Here's how I use the wonderful SimpleCov to help guide my testing.
(March 23, 2018)
Support for Rails 5.1 system testing is now available to RSpec fans like you and me. Here's how I moved my book's feature specs to system specs.
(January 08, 2018)
Do you need yet another reason to move code out of controllers and into service (or whatever you want to call them) objects? How about better, forward-thinking testability?
(November 20, 2017)
In part two of a series on ditching controller specs, let's move a complicated
controller example into a more reasonable, future-proof feature spec.
(September 05, 2016)
Does your application's test suite rely heavily on controller specs? It's time to consider alternatives, as controller testing has changed in Rails 5.
Here's one way to replace a common use of these specs, even if you haven't
upgraded to Rails 5 yet.
(August 29, 2016)
I love how extensible GitHub's Atom editor is. Here are some useful packages for using it to edit and run RSpec tests.
(August 27, 2015)
Rails offers a couple of methods to access persisted test data, but how do they work? Let's get some answers, with the help of Pry.
(April 05, 2015)
A quick one, for readers of my RSpec book: Moving to a headless driver for faster JavaScript testing with Capybara.
(January 27, 2015)
How do you turn testing knowledge into a testing habit? Learn from an expert.
(January 15, 2014)
When is it beneficial to include a view spec in your Rails app's test suite? Here's one example.
(November 15, 2013)
Notes on using tests to learn about legacy software.
(April 16, 2013)
Integration testing with RSpec request specs make sure your application's various parts are working in cohesion. Here's a primer on getting started.
(April 24, 2012)
Controllers are the glue in a Rails application, and should be tested just like any other code. This primer will guide you to better coverage in your own apps' controllers.
(April 07, 2012)
How can you make sure your application's core building blocks are doing what you expect them to? Let's start by using RSpec to test model functionality.
(March 19, 2012)
Our series on getting comfortable with Rails testing continues as we set up RSpec for an existing application.
(March 12, 2012)
Are you still wrapping your head around Rails testing techniques? Here are the tools and techniques that helped me go from zero to decent test coverage.
(March 12, 2012)