moneyadviceservice/frontend — pull request #86 by stevenwilkin (2014-03-03 16:04:02+00:00)
Title: Create a fake category repository and use it when features are run

This is a rough first version of using a fake repository during test runs.

Currently our features are using VCR to mock out API calls for ``Article`` and ``ActionPlan`` content however they are using manually crafted cassettes which aren't easily modified to support replaying the API calls for ``Category`` data.

Considering we're abstracting API access with repositories we can simply choose to use a repository containing static data rather than coercing our test setup to mock out additional HTTP requests.

As discussed with @andrewgarner the intention is to replace our current use of VCR in this app with fake repositories.

The shortcoming of this first pass is that the data is hardcoded in the class but it could be extended to load from a YAML file and/or to have methods to programatically add and remove contents.