Hi,
I am trying to run the specs for the various rspec* gems. The files are in
a directory with full path contains a '+' character. I run into several
failures, because of this symbol.
Most of them are due to the fact that in the specs, messages are matched
against regexps constructed from __FILE__, like /#{__FILE__}:#{__LINE__}/,
but to take care of the special + symbol, __FILE__ would need to be
replaced by Regexp.escape(__FILE__).
However, one is more subtle and is caused by the method
run_ruby_with_current_load_path from
rspec-support/lib/rspec/support/spec/shell_out.rb. It currently calls
:shellescape on all directory names in the $LOAD_PATH, to call the Ruby
interpreter with these escaped directory as an argument for the -I option.
However, when doing that, names in the $LOAD_PATH containing a + are not
found by the interpreter once escaped (causing failures because ruby cannot
find some libs, like rspec/core in tests using
run_ruby_with_current_load_path), but if I remove simply the shellescape
call, then for some reasons, the specs are exploring all my disks, because
certainly something went wrong with the -I parameters without the
shellescape...
Do you have an idea how one could fix the last step?
Thank you in advance for your advice.
Cheers,
Cédric
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/2e612d13-abf4-426c-be67-59df3b56d3c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.