Autotest won't pickup any tests


#1

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.


#2

On Fri, Feb 20, 2009 at 6:15 AM, Christian Hoeppner
removed_email_address@domain.invalid 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.


#3

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)
removed_email_address@domain.invalid
http://rubyforge.org/mailman/listinfo/rspec-users

Saludos,
Chris H.
S.A.T. Gigabyte Solution S.L.
637 333 204
928 821 633
removed_email_address@domain.invalid
codigo404.wordpress.com


#4

On Mon, Feb 23, 2009 at 4:17 AM, Christian Hoeppner
removed_email_address@domain.invalid 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?


#5

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
removed_email_address@domain.invalid
http://rubyforge.org/mailman/listinfo/rspec-users

Saludos,
Chris H.
S.A.T. Gigabyte Solution S.L.
637 333 204
928 821 633
removed_email_address@domain.invalid
codigo404.wordpress.com


#6

On Mon, Feb 23, 2009 at 9:26 AM, Christian Hoeppner
removed_email_address@domain.invalid 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.


#7

On Mon, Feb 23, 2009 at 9:26 PM, David C. removed_email_address@domain.invalid
wrote:

On Mon, Feb 23, 2009 at 9:26 AM, Christian Hoeppner
removed_email_address@domain.invalid 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