Topic: rSpec with Autotest error

Hi,

I am currently making the switch to rSpec. However I have a problem when running rSpec with Autotest. This is the error message I get I launching autotest:

C:\InstantRails\ruby\bin\ruby -rrubygems -e "require 'redgreen'"  -S script/spec -O spec/spec.opts  spec/models/weather_spec.rb spec/control
lers/weathers_routing_spec.rb spec/views/weathers/edit.html.erb_spec.rb spec/controllers/weathers_controller_spec.rb spec/helpers/weathers_h
elper_spec.rb spec/views/weathers/show.html.erb_spec.rb spec/views/weathers/index.html.erb_spec.rb spec/views/weathers/new.html.erb_spec.rb
invalid option: -O
Test::Unit automatic runner.
Usage: -e [options] [-- untouched arguments]

Has anyone else had this problem?

EDIT: part of the solution can be found here: http://www.ruby-forum.com/topic/139525

But I made changes to my .autotest file, autotest just doesn't care about those changes. What's happening?


EDIT: this strange behaviour happens only in the rails app where I have installed rspec as a plugin. In my other apps when I edit .autotest then the changes take effect.


EDIT: I have destroyed my app and recreated it, and autotest still doesn't care a penny about my .autotest file, that's becoming crazy! I have even deleted the .autotest file, and still it seems to be picking it up from somewhere because it triggers snarl all the time...


EDIT: ok it was fixed by setting correctly the HOME environment variable to Documents and Settings\myname

Last edited by Johnson (2008-02-13 12:10:54)

Re: rSpec with Autotest error

Now I have another problem, and it's that with autotest all tests pass although there is one example that sould fail!


EDIT: fixed!

I had to uninstall the gems: redgreen and win32console. Removing the require from the .autotest file wasn't enough.


EDIT: actually it is win32console that makes all the tests pass, but if I only install redgreen without win32console, autotest refuses to start because it wants win32console too.

So I'll forget about the colors in the shell for the time being.

Last edited by Johnson (2008-02-13 12:04:46)

Re: rSpec with Autotest error

And again, I now have another problem.

In autotest in the command shell, I see that there is a failure, however in the Snarl popup window, it shows "all tests pass"...

What could possibly go wrong? I am getting tired of all these buggy behaviours...