Autotest won't pickup any tests

Hey there,

I’ve tried using Nick S.'s “plugin” to have autotest run my tests
for gems and other non-rails stuff. However, it doesn’t seem to match
any tests for any files. Not being sure what was wrong, I traced the
execution of RspecAutotest.run() and saw that tests_for_file() never
got called. I also replicated a tests_for_file() call by hand in irb,
and it does match the right spec file for any given implementation file.

Here’s what I use:
ZenTest (3.11.1), rspec (1.1.12), ruby, ruby 1.8.1 (2003-12-25) [i686- darwin].

Sieger’s file is the latest from svn, dated from 2007.

On Fri, Feb 20, 2009 at 6:15 AM, Christian Hoeppner
[email protected] wrote:

Hey there,

I’ve tried using Nick S.'s “plugin” to have autotest run my tests for
gems and other non-rails stuff. However, it doesn’t seem to match any tests
for any files. Not being sure what was wrong, I traced the execution of
RspecAutotest.run() and saw that tests_for_file() never got called. I also
replicated a tests_for_file() call by hand in irb, and it does match the
right spec file for any given implementation file.

That lib is way outdated. RSpec now supports autotest directly with
the autospec command.

smacks forehead Who would have known. Ha! I spent the entire weekend
“debugging” that lib.

Now, how do I create a rake task that runs autospec with a few options?

On 20/02/2009, at 15:56, David C. wrote:

RspecAutotest.run() and saw that tests_for_file() never got called.
ZenTest (3.11.1), rspec (1.1.12), ruby, ruby 1.8.1 (2003-12-25)
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Saludos,
Chris H.
S.A.T. Gigabyte Solution S.L.
637 333 204
928 821 633
[email protected]
codigo404.wordpress.com

On Mon, Feb 23, 2009 at 4:17 AM, Christian Hoeppner
[email protected] wrote:

smacks forehead Who would have known. Ha! I spent the entire weekend
“debugging” that lib.

Now, how do I create a rake task that runs autospec with a few options?

RSpec options, Autotest options, or both?

I’m not really sure what options autotest has, since the website is on
“coming soon”, and autotest -h doesn’t show any help, so I’m thinking
about rspec options, like the rpsec command to use, arguments (–diff
unified --color, etc).

Is there a place to read up on autotest behavior and options? I
couldn’t even find a manpage, but maybe I’m not looking hard enough.

On 23/02/2009, at 13:49, David C. wrote:

gems and other non-rails stuff. However, it doesn’t seem to match

rspec-users mailing list
S.A.T. Gigabyte Solution S.L.


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Saludos,
Chris H.
S.A.T. Gigabyte Solution S.L.
637 333 204
928 821 633
[email protected]
codigo404.wordpress.com

On Mon, Feb 23, 2009 at 9:26 AM, Christian Hoeppner
[email protected] wrote:

I’m not really sure what options autotest has, since the website is on
“coming soon”, and autotest -h doesn’t show any help, so I’m thinking about
rspec options, like the rpsec command to use, arguments (–diff unified
–color, etc).

Is there a place to read up on autotest behavior and options? I couldn’t
even find a manpage, but maybe I’m not looking hard enough.

There’s not much to look at other than the code - that’s where I
learned everything I know about autotest.

As for rspec options, put those in spec/spec.opts and autotest/rspec
will load them implicitly.

On Mon, Feb 23, 2009 at 9:26 PM, David C. [email protected]
wrote:

On Mon, Feb 23, 2009 at 9:26 AM, Christian Hoeppner
[email protected] wrote:

Is there a place to read up on autotest behavior and options? I couldn’t
even find a manpage, but maybe I’m not looking hard enough.

There’s not much to look at other than the code - that’s where I
learned everything I know about autotest.

You might get some mileage out of the following (though as David notes
the source is the ultimate reference):

  1. http://cheat.errtheblog.com/s/autotest/
  2. The example_dot_autotest.rb file contains a list of options you
    could explore (at the root of the ZenTest directory in your gems
    install)
  3. Googling for ‘autotest add_hook’ pulls up a lot of post about how
    folks have configured autotest. Some of the content is of course
    outdated, but they might give you a jump start.

Cheers,
lasitha