[rspec-devel] [rspec-users] Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)

Charles Grindel cgrindel at yahoo.com
Sun Jul 13 17:50:55 EDT 2008


Thanks for the info, Luis.  I am glad that they fixed the calling a batch file issue.  I have had to handle this myself in several different situations.

I do have one additional question.  It sounds like your setup is very similar to ours.  Is your project new or did you upgrade?  Do you run autospec or autotest from the command line?  It seems like running autotest directly should still work given the history comment, but I could not get things to fly until I started using autospec.  Just curious.


----- Original Message ----
From: Luis Lavena <luislavena at gmail.com>
To: rspec-users <rspec-users at rubyforge.org>
Cc: RSpec Developers Mailing List <rspec-devel at rubyforge.org>
Sent: Friday, July 11, 2008 3:29:04 PM
Subject: Re: [rspec-users] Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)

On Fri, Jul 11, 2008 at 8:33 PM, Charles Grindel <cgrindel at yahoo.com> wrote:
> Hi,
> After upgrading to Rails 2.1, RSpec 1.1.4+ and ZenTest 3.10.0, autotest
> would no longer find any of my specs on my Windows development machine.
> Some Googling directed me to a very recent update in the History.txt file
> for rspec-fails:
> IMPORTANT: use 'script/autospec' (or just 'autospec' if you have the rspec
> gem
> installed) instead of 'autotest'. We changed the way autotest discovers
> rspec
> so the autotest executable won't automatically load rspec anymore. This
> allows
> rspec to live side by side other spec frameworks without always co-opting
> autotest through autotest's discovery mechanism.

Dunno if this funny, but I'm running right now with the exact same
combination of components and autotest picks my updated spec and files
(even the ones in lib).

> My project is running RSpec and Rspec-rails as plugins, but I gave it a
> shot.  Unfortunately, autotest would not even start.  A quick inspection of
> autospec revealed that the call to autotest in this file will not work on
> Windows, as is.  In the Windows environment, autotest is a batch file which
> must be executed with the "call" command when shelling out from a Ruby
> script.  So, I updated my autospec file to the following:
> #!/usr/bin/env ruby
> ENV['RSPEC'] = 'true'
> autotest_cmd = 'autotest'
> autotest_cmd = "call #{autotest_cmd}" if RUBY_PLATFORM =~ /mswin/
> system autotest_cmd
> I have submitted a ticket requesting that autospec be updated accordingly.
> http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/466-update-autospec-to-work-on-windows

The upcoming version of Ruby (1.8.6 after patchlevel 114) will include
a fix for this issue, which I described in this post (less quirks for
us section):


So there is no need to prepend 'call' or ".bat" on Windows anymore
(also, you should consider mswin AND mingw as valid platforms ;-)

Luis Lavena
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams
rspec-users mailing list
rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-devel/attachments/20080713/52bf0ef9/attachment-0001.html>

More information about the rspec-devel mailing list