Monthly Archives: October 2011

Mix with Caution: Callbacks and Setup/Teardown Methods

If you’re familiar with unit testing tools (at least the ones based eventually on JUnit), you’ll immediately recognize the concept of testcase hooks, especially for setup and teardown.  All of the testing frameworks for Ruby come with varying degrees of hook expressivity. Rails provides an extension to the standard Test::Unit framework in the form of […]

Leave a comment

Testing External Redirects: VCR & Capybara-Mechanize

The problem:  You need to test an action in a Rails app that redirects to an external site or service.  For example, you want to do multipass-based single-sign on with Assistly. You think, “Fine.  I’m using fakeweb, I’ll just create a stub for the external API.”  This works fine in theory, until you get the […]

1 Comment

Our Integration Tests

Testing “outside-in” is a model that’s coming into favor, in the form of BDD and tools and Cucumber.   High-level tests are easy to understand and decoupled enough from the underlying implementation that they survive significant architectural changes.   We’ve described some our API testing strategy using Cucumber in an earlier post.  Today, I’d like […]

Leave a comment