[rspec-users] testing modules

Pat Maddox pergesu at gmail.com
Fri Jan 18 04:06:07 EST 2008

On Jan 11, 2008 12:57 PM, Neil M. Young <ermok at tiscali.co.uk> wrote:
> I've developed a module to include in ActiveRecord derived classes. Can I
> test the module without having to tie it to a particular class? atm, I'm
> including it in my User class and writing the tests in user_spec.rb, but I
> don't like the idea of tying the module tests to those of the class.
> I may extract the specs to a shared description and include that in the
> specs for each model which uses the module. is that the right way to do it?
> I'd appreciate any thoughts or suggestions
> neil
> --
> View this message in context: http://www.nabble.com/testing-modules-tp14764396p14764396.html
> Sent from the rspec-users mailing list archive at Nabble.com.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

I like to stick this sort of thing in a plugin, and write specs in the
plugin, that way it has nothing to do with your production code.


More information about the rspec-users mailing list