On 9/7/07, <b class="gmail_sendername">David Chelimsky</b> <<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Actually, on that note -- what's the normal way to share a setup across<br>> multiple behaviors, a helper method in an includeable module?<br><br>You can include callable methods in modules, but they have to be
<br>called from within the spec.<br><br>Alternative is shared behaviours:<br><a href="http://rspec.rubyforge.org/documentation/index.html">http://rspec.rubyforge.org/documentation/index.html</a> (scroll down a<br>bit).</blockquote>
<div><br>I've already got some shared behaviors, they're great; nice way to use a unit-level assertions n higher-level tests for instance without breaking DRY.<br></div><br>Hadn't really thought about using these just for setup; the syntax would look a little weird what with it_should_behave_like, but it's still a thought.
<br><br></div>-- <br>Geoffrey Wiseman<br>