restebanez/agi — pull request #31 by harryw (2012-08-30 22:34:59+00:00)
Title: Update RDS instances in the background instead of requiring a page refresh

These code changes implement background processing of RDS updates that set the correct security group when restoring from a snapshot. Previously this would only happen on a page refresh.

The background jobs are handled pretty simply using delayed_job.

The majority of the changes here are in the Cucumber tests. In order to properly test the feature, I modified the relevant scenario to check that the database state is modified independently of a page refresh. However, the relevant step defs were tightly coupled to specific VCR cassettes, which is not really a scalable way to use VCR with Cucumber.

I have changed the step defs so that the step defs are entirely independent of any specific VCR cassettes. Instead, the Cucumber tag 'isolate' is used to mark scenarios for VCR recording and playback. Each scenario then uses its own VCR cassette. This is much more practical in the long term and makes steps much more reusable.

There are still plenty of things to be improved in the Cucumber tests, but this is already a much more extensive change than I was initially expecting to make.