IdolHands.com :: Days in the Life of an Alpha Geek
Provides a solution for problems raised by nested sets and single-table inheritance (STI).
The counter_cache option for Rails relationships is invaluable in speeding up performance by reducing the number SQL queries, but there are a couple of things that you need to do to ensure that your counts start off right and to make the whole thing work with STI-based models.
As the number of tests goes up in your Rails project, you'll find yourself spending more and more time waiting for the RSpec to finish. This article shows you how to track down slow-running examples to target for refactoring.
Demonstrates a method for writing RSpec tests to test output from Ruby on Rails controllers that return JSON content.
Use reflection and code generation to automatically created tests in RSpec for named scopes in Ruby on Rails ActiveRecord models.
Demonstrates a method for using RSpec to test ActiveRecord models that are not backed by a database table.
Rapid application development and Agile development practices emphasize execution over design, with iterative development phases intended to improve the quality of code over time. If integrated testing isn't part of your development process, however, you'll waste time on each iteration fixing broken code instead of moving your app forward.
Articles in this area cover RSpec, RCov, Reek, and other testing tools and technologies.