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

Charles Grindel cgrindel at yahoo.com
Fri Jul 11 14:33:20 EDT 2008


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.

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

Thanks,
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-devel/attachments/20080711/1f05ef4f/attachment.html>


More information about the rspec-devel mailing list