|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
autotest displays no outputHey, 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. * Windows XP SP2 * Ruby 1.8.6 * RSpec 1.0.8 * Zentest 3.6.1 |
|
|
Re: autotest displays no outputOn Oct 31, 2007 9:30 AM, pangel <pangel.neu@...> wrote:
> > 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. > > * Windows XP SP2 > * Ruby 1.8.6 > * RSpec 1.0.8 > * Zentest 3.6.1 Does it work w/ test/unit in the otherwise-same environment? > -- > View this message in context: http://www.nabble.com/autotest-displays-no-output-tf4725432.html#a13510545 > Sent from the rspec-users mailing list archive at Nabble.com. > > _______________________________________________ > rspec-users mailing list > rspec-users@... > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
|
|
Re: autotest displays no outputAs 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.
Worth a try.
On 10/31/07, David Chelimsky <dchelimsky@...> wrote: On Oct 31, 2007 9:30 AM, pangel <pangel.neu@...> wrote: _______________________________________________ rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
|
|
Re: autotest displays no outputOn Oct 31, 2007 10:44 AM, Lee Irving <irvingld@...> wrote:
> As you are on Windows can I suggest you try removing all of the options from > your spec.opts file Or you can just remove that file :) > and try again. You need to do this with native windows > but not sure about cygwin. > > Worth a try. > > > > On 10/31/07, David Chelimsky <dchelimsky@...> wrote: > > On Oct 31, 2007 9:30 AM, pangel <pangel.neu@...> wrote: > > > > > > 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. > > > > > > * Windows XP SP2 > > > * Ruby 1.8.6 > > > * RSpec 1.0.8 > > > * Zentest 3.6.1 > > > > Does it work w/ test/unit in the otherwise-same environment? > > > > > -- > > > View this message in context: > http://www.nabble.com/autotest-displays-no-output-tf4725432.html#a13510545 > > > Sent from the rspec-users mailing list archive at Nabble.com. > > > > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users@... > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users@... > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > rspec-users mailing list > rspec-users@... > http://rubyforge.org/mailman/listinfo/rspec-users > rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
|
|
Re: autotest displays no output 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. See below. I ran into this as well - see my posts here: http://chrisdpratt.com/2007/09/04/rails-rspec-autotest-redgreen-and-snarl-reasons-i-dont-like-windows/ There's a bug in ZenTest: http://rubyforge.org/tracker/index.php?func=detail&aid=14203&group_id=419&atid=1678 The fix is to remove the smartness in zentest that attempts to construct a proper path to Ruby on Windows (I assume that's why they put it in there). So in the autotest.rb file in the ZenTest 3.6.1 gem, make sure that the definition of the "ruby" method looks like this: # determine and return the path of the ruby executable. def ruby ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) return ruby end and then autotest will be able to find your ruby executable. Note that I never got the red/green thing working in snarl although it does work in the command window if I do it there by hand. Wes pangel wrote: > 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. > > * Windows XP SP2 > * Ruby 1.8.6 > * RSpec 1.0.8 > * Zentest 3.6.1 > rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
|
|
Re: autotest displays no outputI am quite a beginner so maybe I'm not looking into the right place, but I don't think I have a spec.opts file.
The same problem (ie no output with autotest) happens with Test::Unit. As a cygwin user, do I still need win32console? Just occured to me. Also, to make sure I didn't forget something obvious, this is how my files are setup: (I used David Chelimsky's Introduction tutorial) /rspec_testing/.autotest (http://pastie.caboo.se/112757) /rspec_testing/user.rb (http://pastie.caboo.se/112758) /rspec_testing/user_spec.rb (http://pastie.caboo.se/112759)
|
|
|
Re: autotest displays no outputPangel,
I run autotest on cygwin so it can work ... :) Does rake spec work ? Have you installed all gems in cygwin ? How are you starting autotest ? On 10/31/07, pangel <pangel.neu@...> wrote:
-- Cheers! sinclair _______________________________________________ rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
|
|
Re: autotest displays no outputI just did the modification and the problem remains.
Is there a way to output the final value of the ruby variable so I can check if it matches the actual path to ruby?
|
|
|
Re: autotest displays no outputOne last thing - ensure that there is no "--colour" option in your
spec.opts. Don't know why it matters but it does. Throw a quick "puts" into autotest.rb to verify the value of the ruby variable. Wes pangel wrote: > I just did the modification and the problem remains. > > Is there a way to output the final value of the ruby variable so I can check > if it matches the actual path to ruby? > > > Wes Gamble wrote: > >> 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. >> >> See below. >> >> I ran into this as well - see my posts here: >> http://chrisdpratt.com/2007/09/04/rails-rspec-autotest-redgreen-and-snarl-reasons-i-dont-like-windows/ >> >> There's a bug in ZenTest: >> http://rubyforge.org/tracker/index.php?func=detail&aid=14203&group_id=419&atid=1678 >> >> The fix is to remove the smartness in zentest that attempts to construct >> a proper path to Ruby on Windows (I assume that's why they put it in >> there). >> >> So in the autotest.rb file in the ZenTest 3.6.1 gem, make sure that the >> definition of the "ruby" method looks like this: >> >> # determine and return the path of the ruby executable. >> def ruby >> ruby = File.join(Config::CONFIG['bindir'], >> Config::CONFIG['ruby_install_name']) >> >> return ruby >> end >> >> and then autotest will be able to find your ruby executable. >> >> Note that I never got the red/green thing working in snarl although it >> does work in the command window if I do it there by hand. >> >> Wes >> >> >> pangel wrote: >> >>> 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. >>> >>> * Windows XP SP2 >>> * Ruby 1.8.6 >>> * RSpec 1.0.8 >>> * Zentest 3.6.1 >>> >>> >> _______________________________________________ >> rspec-users mailing list >> rspec-users@... >> http://rubyforge.org/mailman/listinfo/rspec-users >> >> >> > > rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
|
|
Re: autotest displays no outputIt 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"
|
|
|
Re: autotest displays no outputGreat!
<app-root> /spec /controllers /models /helpers /views
is a common way to organize the specs --
Cheers! sinclair _______________________________________________ rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
|
|
Re: autotest displays no outputThere 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'], Config::CONFIG['ruby_install_name']) # 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+'"' 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? -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
|
|
Re: autotest displays no outputHi all,
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, -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@... http://rubyforge.org/mailman/listinfo/rspec-users |
| Free embeddable forum powered by Nabble | Forum Help |