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?
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?
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.
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.
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.