alphagov/whitehall — pull request #284 by chrisroos (2013-02-27 15:59:21+00:00)
Title: Reduce the number of functional tests

This branch utilises the recently introduced GenericEditionsController[1] to
reduce the number of functional tests by 268 (an unscientific saving of *60
seconds* when running test:functionals on my machine).

This reduction in tests is possible because quite a lot (possibly all?) of our
controller test macros generate tests that exercise the exact same logic
irrespective of the controller. This is normally logic in the edition
templates/partials or in the edition controller and its associated mixins.

I've started by replacing all test macros that *didn't* use anything like
`controller_attributes_for` or `controller_attributes_for_instance`. It's very
possible that the remainder (or at least the majority) of the test macros
could be replaced in the same way. We'd need to take extra care over these to
be sure that we're not losing test coverage though.

[1] ed04c7c6188243a0bfc4f093a0a2f3fcce66782f