Adding custom directories (source and spec) to autotest in a Rails 3 project

坚强是说给别人听的谎言 提交于 2019-12-22 09:26:55

问题


I have a Rails 3 app that uses RSpec2 as my testing framework, and I'm able to use autotest to watch my model and spec directories for changes and re-run my spec suite when files change.

I'd like to add a directory with some custom classes in it (RAILS_ROOT/lib/some_project/lib/.rb) and their corresponding specs (RAILS_ROOT/spec/some_project/_spec.rb) so that autotest will automatically pick up changes to all of those files and re-run as needed.

How do I get autotest to watch these files in these other directories? I suspect I have to add something to RAILS_ROOT/autotest/discover.rb, but I'm not exactly sure what to do.


回答1:


This looks like what you want to do: http://seandenigris.com/blog/?p=337



来源:https://stackoverflow.com/questions/3605267/adding-custom-directories-source-and-spec-to-autotest-in-a-rails-3-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!