How to doubleclick in Selenium
Capybara tasks can be double-clicked by using Selenium-backed double_click on the matched element; plain Capybara alone does not handle double-clicks.
Use Shoulda's validate_uniqueness_of matcher correctly
validate_uniqueness_of in Shoulda needs an existing record; without it, RSpec can raise “Could not find first Keyword” during uniqueness checks.
Exclude your staging site from Google with robots.txt and not shoot yourself in the foot
Staging sites can be kept out of Google with robots.txt while avoiding a forgotten block on launch by serving a separate exclude file on staging only.
Rails: Have different session secrets for all environments
Using the same Rails session secret in staging and production can let a cookie from one environment authenticate in another. Separate secrets per environment reduce session hijacking risk.
Override e-mail recipients in ActionMailer
Our gem Mail Magnet allows you to override e-mail recipients in ActionMailer so all mails go to a given address.
This is useful for staging environments where you want to test production-like mail delivery without sending e-mails to real users.