[rspec-users] autotest displays no output

Mike Vogel lists at ruby-forum.com
Sun Jan 13 13:11:31 EST 2008

There is also a problem with spaces in the file path to ruby or the spec 
files when running on windows.  A quick dumb fix:

- change the return result of the ruby method of autotest.rb

  def ruby
    ruby = File.join(Config::CONFIG['bindir'],
#    unless File::ALT_SEPARATOR.nil? then
#      ruby.gsub! File::SEPARATOR, File::ALT_SEPARATOR
#    end

#hack to del with space in windows path, e.g., 'c:\program files\ruby' 
doesn't # work unless it is enclosed in quotes.
    return '"'+ruby+'"'

- change the make_test_cmd method in class Autotest::Rspec (for me this 
is in ...\gems\rspec-1.1.1\lib\autotest) to put quotes around the 
@spec_command before using it.

I'm sure there are real ways to fix this.  I'll do some more digging to 
see if I can post something less ugly.

Can someone educate me about the general approach to spaces in file 
paths when using ruby?
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list