I have some specs that ''require'' other files. When running spec_server, if these required files are changed, it''s not picked up when the specs are run. I have to restart spec_server to get the changes recognized. Is there an option or some such to have spec_server reload required files as well when a spec is run? Thanks, Steve
David Chelimsky
2007-Oct-26 01:09 UTC
[rspec-users] spec_server doesn''t update ''required'' files
On 10/25/07, Steve <vertebrate at gmail.com> wrote:> I have some specs that ''require'' other files. When running spec_server, if > these required files are changed, it''s not picked up when the specs are > run. I have to restart spec_server to get the changes recognized. Is there > an option or some such to have spec_server reload required files as well > when a spec is run?Nope.
On Thu, 25 Oct 2007 20:09:23 -0500, David Chelimsky wrote:> On 10/25/07, Steve <vertebrate at gmail.com> wrote: >> I have some specs that ''require'' other files. When running spec_server, if >> these required files are changed, it''s not picked up when the specs are >> run. I have to restart spec_server to get the changes recognized. Is there >> an option or some such to have spec_server reload required files as well >> when a spec is run? > > Nope.Do you know of any existing feature requests for this? If not, I''ll go ahead and file one.
Brian Takita
2007-Oct-26 04:13 UTC
[rspec-users] spec_server doesn''t update ''required'' files
On 10/25/07, Steve <vertebrate at gmail.com> wrote:> On Thu, 25 Oct 2007 20:09:23 -0500, David Chelimsky wrote: > > > On 10/25/07, Steve <vertebrate at gmail.com> wrote: > >> I have some specs that ''require'' other files. When running spec_server, if > >> these required files are changed, it''s not picked up when the specs are > >> run. I have to restart spec_server to get the changes recognized. Is there > >> an option or some such to have spec_server reload required files as well > >> when a spec is run? > > > > Nope. > > Do you know of any existing feature requests for this? If not, I''ll go > ahead and file one.Rails handles the reloading of classes and modules. If you would like to have these files be reloaded, use require_dependency instead of require. You can also use Rails constant autoloading facility (not requiring the file) to register the modules and classes to be reloaded.> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky
2007-Oct-26 11:33 UTC
[rspec-users] spec_server doesn''t update ''required'' files
On 10/25/07, Brian Takita <brian.takita at gmail.com> wrote:> Rails handles the reloading of classes and modules. > If you would like to have these files be reloaded, use > require_dependency instead of require. You can also use Rails constant > autoloading facility (not requiring the file) to register the modules > and classes to be reloaded.I put a note about this in the docs which will be updated with the next release.