# Adding files for autotest to monitor

**URL:** <https://www.ruby-forum.com/t/adding-files-for-autotest-to-monitor/183778>\
**Category:** Rails\
**Created:** [February 19, 2010, 10:33pm UTC](https://www.ruby-forum.com/t/adding-files-for-autotest-to-monitor/183778 "2010-02-19T22:33:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@drewB](https://www.ruby-forum.com/u/drewB)\
**Post date:** [February 19, 2010, 10:33pm UTC](https://www.ruby-forum.com/t/adding-files-for-autotest-to-monitor/183778/1 "2010-02-19T22:33:47Z")

</div>

I am using autotest with RSpec (autospec) and for some reason it  
doesn’t monitor files under the integration folder. Does anyone know  
how to config autotest to monitor additional paths? I tried playing  
with add\_mapping in my .autotest but was not able to get it to work.

Thanks!

P.S. I know that using cucumber for integration testing is the best  
practice for RSpec. Just know that I have a good reason for not using  
it right now.

---

<div class="post-metadata">

**Author:** ![drewB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@drewB](https://www.ruby-forum.com/u/drewB)\
**Post date:** [February 21, 2010, 10:50pm UTC](https://www.ruby-forum.com/t/adding-files-for-autotest-to-monitor/183778/2 "2010-02-21T22:50:26Z")

</div>

After a lot of hunting I figure it out. I added the following to  
my .autotest:

Autotest.add\_hook :initialize do |at|  
at.add\_mapping(%r%^spec/(integration)/.\*rb$%) { |filename, \_|  
filename  
}  
end
