[rspec-users] shared behav
mailing_lists at railsnewbie.com
Tue Dec 18 16:37:39 EST 2007
On Dec 18, 2007, at 12:39 PM, Jonathan Linowes wrote:
> hi, i want to make a behavior shared between models, the examples
> need to create new instances etc. Is there a way to pass the model
> class to the shared behavior?
Nope. The only way to do it right now is with an instance variable.
The shared behaviours can be thought of modules which are included
into the current behaviour - so it should also have access to any
methods defined in the example (group) in which it is shared.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users