Forum: RSpec Autotest won't pickup any tests

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.
24db25a514cca237098febc931d0bf09?d=identicon&s=25 Chris Hoeppner (chriswebstar)
on 2009-02-20 13:40
(Received via mailing list)
Hey there,

I've tried using Nick Sieger'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.
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-02-20 16:58
(Received via mailing list)
On Fri, Feb 20, 2009 at 6:15 AM, Christian Hoeppner
<chris.webstar@gmail.com> wrote:
> Hey there,
>
> I've tried using Nick Sieger'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.
24db25a514cca237098febc931d0bf09?d=identicon&s=25 Chris Hoeppner (chriswebstar)
on 2009-02-23 12:13
(Received via mailing list)
*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 Chelimsky 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)
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Saludos,
Chris Hoeppner
S.A.T. Gigabyte Solution S.L.
<m> 637 333 204
<o> 928 821 633
<e> chris.webstar@gmail.com
<w> codigo404.wordpress.com
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-02-23 14:53
(Received via mailing list)
On Mon, Feb 23, 2009 at 4:17 AM, Christian Hoeppner
<chris.webstar@gmail.com> 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?
24db25a514cca237098febc931d0bf09?d=identicon&s=25 Chris Hoeppner (chriswebstar)
on 2009-02-23 16:55
(Received via mailing list)
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 Chelimsky 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
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Saludos,
Chris Hoeppner
S.A.T. Gigabyte Solution S.L.
<m> 637 333 204
<o> 928 821 633
<e> chris.webstar@gmail.com
<w> codigo404.wordpress.com
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-02-23 17:22
(Received via mailing list)
On Mon, Feb 23, 2009 at 9:26 AM, Christian Hoeppner
<chris.webstar@gmail.com> 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.
E16e84e861c1815ce11ba7bd851c857d?d=identicon&s=25 lasitha (Guest)
on 2009-02-24 05:10
(Received via mailing list)
On Mon, Feb 23, 2009 at 9:26 PM, David Chelimsky <dchelimsky@gmail.com>
wrote:
> On Mon, Feb 23, 2009 at 9:26 AM, Christian Hoeppner
> <chris.webstar@gmail.com> 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
This topic is locked and can not be replied to.