# Autotest and rspec always tests everything

**URL:** <https://www.ruby-forum.com/t/autotest-and-rspec-always-tests-everything/124834>\
**Category:** Rails\
**Created:** [January 2, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/autotest-and-rspec-always-tests-everything/124834 "2008-01-02T23:55:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 2, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/autotest-and-rspec-always-tests-everything/124834/1 "2008-01-02T23:55:09Z")

</div>

Is there a way to limit autotest to just what is saved? I have a small  
app that as four models/controllers. and testing was fast but testing  
everything. I added Restful-Authentication and it tested fine. Now  
whenever I save a change to one of my custom controllers, everything  
is tested including the authentication and it now takes a long time. I  
always thought that AutoTest was only to test things that changed.

I am not sure if it is now just the diff that is taking all the time,  
but the number of test it reports each time is very high compared to  
the controller I am working on.

Any ideas?

Don F.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 3, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/autotest-and-rspec-always-tests-everything/124834/2 "2008-01-03T19:15:29Z")

</div>

On Jan 2, 2008 8:54 PM, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the controller I am working on.  
> I believe that this is the way autotest is designed. It only runs a  
> limited sense when there is a failure, but as soon as that failure is  
> passing it runs the whole suite. This is the behaviour I would expect

- otherwise I have no way of knowing if changes I make to get one  
example passing have any unexpected side effects on other examples.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 3, 2008, 8:57pm UTC](https://www.ruby-forum.com/t/autotest-and-rspec-always-tests-everything/124834/3 "2008-01-03T20:57:40Z")

</div>

So then if something fails, it should just run that test each time  
until it passes. Once it passes, everything is run.

Does “Pending” or “not implemented yet” have an impact? I have  
several “it” statements that are pending. Does that cause it to run  
everything or only only when the go between failure and pass

Don F.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 3, 2008, 9:23pm UTC](https://www.ruby-forum.com/t/autotest-and-rspec-always-tests-everything/124834/4 "2008-01-03T21:23:45Z")

</div>

On Jan 3, 2008 5:57 PM, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> So then if something fails, it should just run that test each time  
> until it passes. Once it passes, everything is run.
> 
> Does “Pending” or “not implemented yet” have an impact? I have  
> several “it” statements that are pending. Does that cause it to run  
> everything or only only when the go between failure and pass

No relation to autotest. The only thing rspec adds to autotest is the  
mappings of what spec files go w/ what code. Autotest only cares about  
pass/fail. Pending is, as far as autotest is concerned, passing.

HTH.

Cheers,  
David
