[rspec-users] inheriting test cases vs. mixing them in

Alexy Khrabrov deliverable at gmail.com
Mon Aug 22 21:33:38 EDT 2011


I've come across an interesting blog post showing how to inherit
tests:

http://benbiddington.wordpress.com/2010/11/06/rspec-common-base-specs/

How does it stack against the usual mixing/shared_examples_for,
beautifully described in

http://blog.davidchelimsky.net/2010/11/07/specifying-mixins-with-shared-example-groups-in-rspec-2/

I.e., what are the cases where you'd do inheritance vs. the usual
shared_examples_for?

Cheers,
Alexy


More information about the rspec-users mailing list