If you’re testing the behavior of deprecated code in your Ruby project, the warning messages littered throughout your spec...
Git allows you to do a binary search across commits to hunt down the commit that introduced a bug.
If you want to iterate over a Range, but only look at every n-th element, use the step method...
When your site is mapped into the URL-space of another server using mod_proxy, ProxyPass and ProxyPassReverse, all requests...
These steps are now part of Spreewald. The step definitions below allow you to test the filename suggested by the...
The step definitions below allow you to write this in both Webrat and Capybara: When I follow "Download as PDF...
Our collection of the most useful Cucumber steps, Spreewald, now supports exact matching of form fields and lets you use...
If you need to find out which of your local commits are not on the remote server do this:
I was recently confronted with the task of creating a two-column liquid layout with a header and footer in...
The ‘merge.*.driver` variable’s value is used to construct a command to run to merge ancestor’s version, current...
This must be one of the coolest, yet quite unknown, technique in Ruby. For certain types of problems (e.g. when...
In regular expressions you can use the zero-width pattern \b to match the beginning or end of a word...
When you need to see the content of a page (i.e. not all the HTML but the relevant text body...
Every time you amend, rebase or reset, git commits get "overwritten". However, git still allows you to checkout those commits...
So you added a new callback to your model that (e.g.) caches some data when it is saved. Now you...
Using this step definition you can check if any form field (text field, checkbox, etc) or button is disabled:
Ruby's net/http is setup to never verify SSL certificates by default. Most ruby libraries do the same. That means...
How to write to the db 27,000 times in 24 seconds instead of 9 minutes.
When you eagerly load an association list using the .include option, and at the same time have a .where on...
If you want to find out whether a Class object is directly inheriting from another class, use superclass: ActiveRecord::RecordNotFound.super...
RSpec 1, RSpec 2 To test whether two arrays have the same elements regardless of order, RSpec 1 and 2...
These two models can be used to access the posts and associated comments of a WordPress database.
To change the commit message of the latest (unpushed, unmerged) commit, you can use git commit --amend
Deadlocks only occur if two transactions in separate threads compete for the same rows in the database. They usually (but...