k0954342/MIUK_Portal — pull request #2 by andyw8 (2013-04-13 14:32:24+00:00)
Title: Controller testing example

Hi David,

I haven't done anything about multiple bookings yet, but I've put in place a basic test setup which will be useful for future development. Have a look through it an let me know if you have any questions.

There are lots options for testing, here I'm using what are probably the most popular options - RSpec, FactoryGirl and Capybara.

I've showing an example of a routing spec and a controller spec. Normally you would also have a model spec and some kind of integration spec (Rails 4 will call these 'feature' specs).

I've added Capybara since I expect we'll need it soon, but it's not actually used yet.