I think in this case, the block will be called by Rake since we're doing a
task.enhance.  I'm pretty sure that enhance blocks are called *after* the
main task (and any existing enhancements) have successfully executed.  Thus,
this block would only be called if the tests passed.

Daniel

On Thu, Mar 25, 2010 at 4:43 PM, Alex Boisvert <[email protected]>wrote:

> Yeah, sometimes our documentation is a little, ahem, forward-looking.  It
> definitely doesn't work on trunk.
>
> I don't know if this worked before and I'm not sure it's a good use-case.
> I'm guessing that if you tried it, it's because there was some appeal to
> it?  I'd be curious to understand your motivation.
>
> In any case, the behavior is under-spec'ed right now.   It's not clear if
> the block should be called if there's a test failure.   And if it should be
> called if test=all is passed.
>
> I'm open to any interpretation on this.  We'll update the doc once we reach
> a consensus.
>
> alex
>
> On Thu, Mar 25, 2010 at 9:42 AM, Peter Schröder <[email protected]> wrote:
>
> > hi,
> >
> > the buildr docs show an example for enhancing the test-task:
> >
> > test do
> >  fail 'More than 3 tests failed!' if test.failed_tests.size > 3
> > end
> >
> > i did not manage to get that one working and i did not see any spec for
> the
> > usage. does it really work?
> >
> > kind regards,
> > peter
>

Reply via email to