Re: [rspec-users] how to test identical behavior without being redundant?

2011-09-26 Thread Pat Maddox
https://www.relishapp.com/rspec/rspec-core/docs/example-groups/shared-examples On Sep 26, 2011, at 2:11 PM, Patrick J. Collins wrote: > I've got many models that have this declared: > has_many :notifications, :as => :notifiable, :dependent => :destroy > > > ... And so I have many model spec

[rspec-users] how to test identical behavior without being redundant?

2011-09-26 Thread Patrick J. Collins
I've got many models that have this declared: has_many :notifications, :as => :notifiable, :dependent => :destroy ... And so I have many model specs such as: describe Reply do it "should eliminate any associated notification records when destroyed" do reply = create_reply re