On Fri, Jul 11, 2008 at 8:33 PM, Charles Grindel <[EMAIL PROTECTED]> 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):

http://blog.mmediasys.com/2008/04/24/contributions-speedup-and-less-quirks-for-us/

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

Regards,
-- 
Luis Lavena
AREA 17
-
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@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to