[rspec-users] [rspec-rails] how to test module behavior once and then confirm that controllers implement it?

Lille lille.penguini at gmail.com
Fri Jan 14 22:57:43 EST 2011


I'm using rspec-rails (1.3.2), and wondering how to save myself the
trouble of testing filters for ActionControllers when those filters
call methods included from modules.

Specifically, what is the recommended structure for the test of the
module filter; next, how can I confirm that the controller classes
that have included the module and are properly calling its methods as

Cracking this could save me from duplicating the testing of the full
behavior of the filters in several instances, in several
ActionController classes.



More information about the rspec-users mailing list