Hey,

Maybe I'm reading that wrong, but that's not exactly what I want to
do.  In my example, when I call the shared context, I'm passing it a
block.  Neither include_context or include_examples take a block when
called.

Thanks.

On Aug 6, 8:56 am, David Chelimsky <dchelim...@gmail.com> wrote:
> On Aug 5, 2011, at 1:55 PM, Christopher J. Bottaro wrote:
>
> > Hello,
>
> > I'm playing around with Rspec again after going from test/unit to
> > rspec then back to test/unit... :)  Right off the bat, I find myself
> > wanting to do something like this:  https://gist.github.com/1128091
>
> > Basically, I want to name a context, then call it later by name,
> > passing a block to it.
>
> > Or in other words... what is the best way to DRY this code?
> >https://gist.github.com/1128108
>
> > Is that possible in Rspec 2.6?
>
> Yes! Take a look 
> athttp://relishapp.com/rspec/rspec-core/dir/example-groups/shared-examplesfor 
> some different options.
>
> > If not, can anyone provide a monkey
> > patch for me?  Thanks!
>
> _______________________________________________
> rspec-users mailing list
> rspec-us...@rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to