As a developer its not uncommon to juggle multiple servers that interact with each other during development. Ensuring that each server has the correct port set while working off of localhost is a cumbersome and error prone issue. port_map is a ruby utility that provides a simple and almost automatic solution to this problem.
Do you define methods within your Rake tasks? You might want to reconsider that, or you're gonna have a bad time down the road. Walkthrough an example which illustrates a tricky gotcha and solutions to avoiding it.
Explore two approaches for testing along with a suggested workflow. The goal is to improve the time spent during regression testing. The described technique can apply to other testing frameworks, assuming they have similar mechanisms to RSpec's it blocks.
RSpec 3.0 introduces new verifying doubles that offer the ability to verify received messages against the underlying class/object. Learn how using verifying doubles offer more robust tests with little effort.