Forum: RSpec Extending the autotest discover rules

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2ab31489a58f527712d75f36c446a465?d=identicon&s=25 Marcelo de Moraes Serpa (Guest)
on 2008-11-19 04:19
(Received via mailing list)
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.
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-11-19 04:35
(Received via mailing list)
On Tue, Nov 18, 2008 at 9:18 PM, Marcelo de Moraes Serpa
<celoserpa@gmail.com> 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
2ab31489a58f527712d75f36c446a465?d=identicon&s=25 Marcelo de Moraes Serpa (Guest)
on 2008-11-19 04:56
(Received via mailing list)
Thanks David, I added a .autotest file in my project root path and the
new
mapping. It worked like a charm!

Marcelo.
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-11-19 04:57
(Received via mailing list)
On Tue, Nov 18, 2008 at 9:55 PM, Marcelo de Moraes Serpa
<celoserpa@gmail.com> 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 :)

Cheers,
David
This topic is locked and can not be replied to.