alphagov/whitehall — pull request #8 by lazyatom (2012-06-26 15:45:43+00:00)
Title: Add integration testing for specialist guide pagination.

Because the javascript operates on various parts of the specialist
guide page, I felt it was more valuable to test it against the actual
HTML, rather than against a fixture generated purely for the tests.

This should give us better regression coverage if changes to the guide
HTML break the javascript.

I've used capybara-webkit as the javascript driver, since that is used
elsewhere in govuk. You'll need Qt installed to install the gem; see
https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit
for how to do proceed. For me, it was simply `brew install qt`, which
downloaded a pre-compiled version for Lion.

I've tried to use 'new world' cucumber testing style here, by which I
mean valuing clarity and explanation in the step names over any reuse
in their implementation.