Articles on shared example

Rudy Jahchan

Rudy Jahchan

BDD Composition over Inheritance with RSpec Shared Examples

The technique of composition over inheritience is more than simply encapsulating objects into larger entities; its really about defining models as being made up of resuable behaviors. It makes sense then in Behavaior Driven Design we apply the technique not just when writing the implementations of our models but also when creating the specifications themselves.