[rspec-users] [ rspec-Patches-9605 ] Patch for ER 9472, shared behaviour

David Chelimsky dchelimsky at gmail.com
Sat Apr 28 11:58:05 EDT 2007


Sorry for the noise - I applied this patch after some time had passed
since it was submitted. I got all the specs passing and assumed all
was OK, but I just tried this outside of RSpec's own environment and
it doesn't work so I must have botched something up.

I'll get this working in the next couple of days and follow up on both
lists when its ready to try for real.

Cheers,
David

On 4/28/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> Hi all - I've applied (to trunk) Bob Cotton's patch which supports
> shared behaviours (link to tracker below).
>
> I'm still toying w/ names, so please be aware that until this is
> released w/ 0.9 it should be considered experimental and there will
> NOT be translation support for it. It will definitely be included in
> some form - just the names (specifically it_should_behave_like) might
> change.
>
> That said, I encourage all you trunksters to grab the latest trunk and
> give this feature a roll. I think it solves the problem of duplication
> across behaviours very nicely. And please provide feedback. If you
> have any issues with this I want to know about them before we release
> 0.9 (which is coming VERY soon).
>
> Cheers,
> David
>
> On 4/28/07, noreply at rubyforge.org <noreply at rubyforge.org> wrote:
> > Patches item #9605, was opened at 2007-03-27 04:08
> > You can respond by visiting:
> > http://rubyforge.org/tracker/?func=detail&atid=3151&aid=9605&group_id=797
> >
> > >Category: runner module
> > Group: None
> > >Status: Closed
> > >Resolution: Accepted
> > Priority: 3
> > Submitted By: Bob Cotton (bcotton)
> > >Assigned to: David Chelimsky (dchelimsky)
> > Summary: Patch for ER 9472, shared behaviour
> >
> > Initial Comment:
> > I chose behaves_as, as the inclusion method.
> >
> > I don't like the use of the global, behavior_runner, in Behavior to find shared behaviors. Putting the collection on Spec::Runner seemed just as bad.
> >
> >
> >
> > Had to move some methods on module Spec::DSL::BehaviourEval::ModuleMethods from private to protected to faciliate copying things from one EvalModule to another.
> >
> >
> >
> > There are many combinations of include, setup/teardown, context_setup/context_teardown and inherit that are not covered in the shared_behavior spec. Let me know if you want more. Might be a good place for shared behaviors!
> >
> >
> >
> >  -Bob
> >
> > ----------------------------------------------------------------------
> >
> > >Comment By: David Chelimsky (dchelimsky)
> > Date: 2007-04-28 14:34
> >
> > Message:
> > Applied to trunk rev 1820.
> >
> >
> >
> > Nice work Bob - thanks!
> >
> > ----------------------------------------------------------------------
> >
> > Comment By: Bob Cotton (bcotton)
> > Date: 2007-04-02 14:11
> >
> > Message:
> > Newest version of the patch attached.
> >
> > ----------------------------------------------------------------------
> >
> > Comment By: Aslak Hellesøy (aslak_hellesoy)
> > Date: 2007-03-28 11:11
> >
> > Message:
> > I haven't had time to look into this in detail, but it looks interesting. Right now we're trying to get 0.9 out the door, and we're reluctant to add new features before 0.9 is released.
> >
> >
> >
> > Let's revisit this post 0.9
> >
> > ----------------------------------------------------------------------
> >
> > Comment By: Bob Cotton (bcotton)
> > Date: 2007-03-27 12:12
> >
> > Message:
> > Missed the checkbox. Sorry.
> >
> > ----------------------------------------------------------------------
> >
> > Comment By: Bob Cotton (bcotton)
> > Date: 2007-03-27 12:11
> >
> > Message:
> > One more thing, rcov is at 100%, but I can't get pre_commit
> >
> > to run. It either runs out of memory, or the stack is too deep.
> >
> > ----------------------------------------------------------------------
> >
> > Comment By: David Chelimsky (dchelimsky)
> > Date: 2007-03-27 04:16
> >
> > Message:
> > File please.
> >
> > ----------------------------------------------------------------------
> >
> > Comment By: David Chelimsky (dchelimsky)
> > Date: 2007-03-27 04:15
> >
> > Message:
> > Hi Bob - I'll take a look at this tomorrow. Thanks.
> >
> >
> >
> > FYI - the problem you had running pre_commit was due to something we were trying to fix w/ 1.8.6. I reverted the spectask and you can run pre_commit now.
> >
> > ----------------------------------------------------------------------
> >
> > Comment By: Bob Cotton (bcotton)
> > Date: 2007-03-27 04:10
> >
> > Message:
> > One more thing, rcov is at 100%, but I can't get pre_commit
> >
> > to run. It either runs out of memory, or the stack is too deep.
> >
> > ----------------------------------------------------------------------
> >
> > You can respond by visiting:
> > http://rubyforge.org/tracker/?func=detail&atid=3151&aid=9605&group_id=797
> >
>


More information about the rspec-users mailing list