Extending the autotest discover rules


#1

Hello,

We are creating tests for presenters (presenter pattern) classes. We are
putting the implementation classes in app/presenters and we thought on
putting the specs in spec/presenters. Question is, how could I extend
the
autotest discover rules so that it will also monitor the presenter
classes
and run its correspondent tests when any of them changes?

Thanks,

Marcelo.


#2

On Tue, Nov 18, 2008 at 9:18 PM, Marcelo de Moraes S.
removed_email_address@domain.invalid wrote:

Hello,

We are creating tests for presenters (presenter pattern) classes. We are
putting the implementation classes in app/presenters and we thought on
putting the specs in spec/presenters. Question is, how could I extend the
autotest discover rules so that it will also monitor the presenter classes
and run its correspondent tests when any of them changes?

What you are talking about is not discovery, but mapping. Please see
the autotest doco at
http://zentest.rubyforge.org/ZenTest/classes/Autotest.html.

Cheers,
David


#3

Thanks David, I added a .autotest file in my project root path and the
new
mapping. It worked like a charm!

Marcelo.


#4

On Tue, Nov 18, 2008 at 9:55 PM, Marcelo de Moraes S.
removed_email_address@domain.invalid wrote:

Thanks David, I added a .autotest file in my project root path and the new
mapping. It worked like a charm!

Thank Ryan for offering a nice API to manage it - I just pointed you
to the docs :slight_smile:

Cheers,
David