Hey, I’m trying to configure autotest with rspec on cygwin but something
is
going wrong.
I made a very simple testing environment with a user.rb and user_spec.rb
file. Rspec works fine, but autotest outputs nothing - it just stays
here,
idle. ^C doesn’t display anything more.
I can see it’s running because I added require ‘autotest/snarl’ in my
.autotest file. And Snarl tells me “Autotest was started” when I start
it,
and “autotest was reset” when I ^C.
But absolutely no log, no information. Nothing happens either when I
modify
a user.rb/user_spec.rb. Very strange.
As you are on Windows can I suggest you try removing all of the options
from
your spec.opts file and try again. You need to do this with native
windows
but not sure about cygwin.
From a previous post - the bottom line is that even in Cygwin,
File::ALT_SEPARATOR returns “”. In autotest.rb (under ZenTest/lib),
the
method named “ruby” which attempts to return the path to the executable
doesn’t work correctly on Windows.
It works! I simply created a /spec directory and moved user_spec.rb to
/spec/spec_user.rb
I’ll stick with this solution for now. The integration with snarl is
alright
just not perfectly stable, sometimes snarl ‘forgets’ to signal me a
change
in the test results.
Anyway, to answer your questions:
I tried rake spec but it says ‘rake aborted, no rake file found,
etc…’.
I googled quite a bit but I really have no idea what code I should but
in
rakefile.rb.
yes, I installed all my gems from cygwin.
I simply go into rspec_user/ and type “autotest”
sinclair bain-2 wrote:
As a cygwin user, do I still need win32console? Just occured to me.
Hey, I’m trying to configure autotest with rspec on cygwin but
#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+’"’
end
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?
I wasn’t able to solve the problem of autotest not printing or running
test until i read this post. I deleted the opts file and everything
started working again.
I am running autotest from Netbeans though, within my RoR projects. If i
use the command line, it doesn’t print colored results but i quite am
happy with what i have at the moment as long as it’s working.
Anyway, i recommend using autotest with Netbeans because of the
notifications you get within the IDE itself.
Cheers,
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.