search for: animal_spec

Displaying 1 result from an estimated 1 matches for "animal_spec".

2007 Sep 14
0
using #include in shared behaviours
...Jamis Buck), so each spec/ concerns/*_spec.rb really just contains a shared behaviour which is used in the appropriate specs in spec/models (i.e. of those models whose app/models counterpart mixes in that concern). Each such model says require File.dirname(__FILE__) + ''/../concerns/ animal_spec'' and describe Dog do before(:each) do @animal = Dog.new end; it_should_behave_like ''all animals'' end, which works fine. Some of the concern specs need helpers from modules in spec_helper, but any attempt to include those modules within the shared behaviour blows u...