If we are using ActiveScaffold in a controller, we might want to write test for that controller too. So we can write functional tests for all action that ActiveScaffold added to our controller like index, create, edit, update etc…
Since all these action are added by ActiveScaffold then these tests must go with ActiveScaffold plugin tests itself and I think they are at their place.
So we just need to test that ActiveScaffold is configured for that particular controller and uses the right model by:
assert_not_nil CampusController.active_scaffold_config assert CampusController.active_scaffold_config.model == Campus
Ofcourse, we also need to write tests for custom actions added by us.
Good information. Thanks for Sharing.
I like your style of blogging – small and to the point.