Charles Grindel
2008-Jul-11 18:33 UTC
[rspec-users] Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)
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-users/attachments/20080711/1f05ef4f/attachment.html>
Luis Lavena
2008-Jul-11 19:29 UTC
[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): 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
Mark Wilden
2008-Jul-11 21:25 UTC
[rspec-users] Fwd: Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)
Rspactor is a great alternative to autotest if you''re on a Mac. It uses the OS to tell it when files have changed, instead of continually scanning the project tree. That makes it faster and less of a burden on the system. ///ark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080711/c0eaff5d/attachment-0001.html>
Luis Lavena
2008-Jul-11 22:03 UTC
[rspec-users] Fwd: Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)
On Fri, Jul 11, 2008 at 11:25 PM, Mark Wilden <mark.wilden at gmail.com> wrote:> Rspactor is a great alternative to autotest if you''re on a Mac. It uses the > OS to tell it when files have changed, instead of continually scanning the > project tree. That makes it faster and less of a burden on the system. >If I''m in a Mac... running Windows on parallels? ;-) I think the same can be achieved under Windows using the File monitoring api.. Anyhow, autotest tend to leak some memory due it''s scanning (but you can restart it after 6 hours of continuous monitoring). -- 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
Charles Grindel
2008-Jul-13 21:50 UTC
[rspec-users] Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)
Hi, 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. Thanks, Chuck ----- 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): 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 at rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080713/52bf0ef9/attachment.html>
David Chelimsky
2008-Jul-13 22:11 UTC
[rspec-users] Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)
On Sun, Jul 13, 2008 at 4:50 PM, Charles Grindel <cgrindel at yahoo.com> wrote:> Hi, > > 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.When we introduced autospec, we also changed the way rspec identifies itself to autotest such that an ENV var must be present (which is set by autospec) - so no, the autotest command won''t work.> > Thanks, > Chuck > > ----- 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): > > 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 at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Luis Lavena
2008-Jul-15 08:16 UTC
[rspec-users] Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)
On Mon, Jul 14, 2008 at 12:11 AM, David Chelimsky <dchelimsky at gmail.com> wrote:> On Sun, Jul 13, 2008 at 4:50 PM, Charles Grindel <cgrindel at yahoo.com> wrote: >> Hi, >> >> 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. > > When we introduced autospec, we also changed the way rspec identifies > itself to autotest such that an ENV var must be present (which is set > by autospec) - so no, the autotest command won''t work. >Hmn, really? rspec, commit 5bb989c6a54e325198e180ef3d4e59b5bf6eb21c rspec-rails: commit 9a1e10e7b71f7e8e4fb910a9695ee69abec63816 http://pastie.org/private/gwgvkbhpbvhvtquslwe6g But in any case, if you say that I should use script/autospec, then I should :-) -- 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
David Chelimsky
2008-Jul-15 12:03 UTC
[rspec-users] Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)
On Tue, Jul 15, 2008 at 3:16 AM, Luis Lavena <luislavena at gmail.com> wrote:> On Mon, Jul 14, 2008 at 12:11 AM, David Chelimsky <dchelimsky at gmail.com> wrote: >> On Sun, Jul 13, 2008 at 4:50 PM, Charles Grindel <cgrindel at yahoo.com> wrote: >>> Hi, >>> >>> 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. >> >> When we introduced autospec, we also changed the way rspec identifies >> itself to autotest such that an ENV var must be present (which is set >> by autospec) - so no, the autotest command won''t work. >> > > Hmn, really? > > rspec, commit 5bb989c6a54e325198e180ef3d4e59b5bf6eb21c > rspec-rails: commit 9a1e10e7b71f7e8e4fb910a9695ee69abec63816 > > http://pastie.org/private/gwgvkbhpbvhvtquslwe6gHmm. Well, it''s not supposed to work :) We added autospec specifically so that it wouldn''t. Check out http://rspec.lighthouseapp.com/projects/5645/tickets/394 and http://github.com/dchelimsky/rspec/commit/c12b4e0cdcae1309725eeee75ce85110b905f432. Any reason that shouldn''t work on windows?> But in any case, if you say that I should use script/autospec, then I should :-) > > -- > 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 at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Luis Lavena
2008-Jul-15 12:41 UTC
[rspec-users] Getting RSpec 1.1.4+ to Work with Autotest (ZenTest 3.10.0) on Windows (Win32)
On Tue, Jul 15, 2008 at 2:03 PM, David Chelimsky <dchelimsky at gmail.com> wrote:> On Tue, Jul 15, 2008 at 3:16 AM, Luis Lavena <luislavena at gmail.com> wrote: >> [...] >> >> Hmn, really? >> >> rspec, commit 5bb989c6a54e325198e180ef3d4e59b5bf6eb21c >> rspec-rails: commit 9a1e10e7b71f7e8e4fb910a9695ee69abec63816 >> >> http://pastie.org/private/gwgvkbhpbvhvtquslwe6g > > Hmm. Well, it''s not supposed to work :) We added autospec specifically > so that it wouldn''t. Check out > http://rspec.lighthouseapp.com/projects/5645/tickets/394 and > http://github.com/dchelimsky/rspec/commit/c12b4e0cdcae1309725eeee75ce85110b905f432. > Any reason that shouldn''t work on windows? >Besides because is Windows? ;-) (just kidding) There is no specific code there, This are my .autotest and ~/.autotest contents: http://pastie.org/private/chano8j5px7izztck0t6tw One thing I noticed is that using script/autospec spec modifications get picked, but after successfully run they do not try to do a full run.. (try running the whole spec files). On the other hand, autotest try run the modified specs and *then* run a full check on all the specs (expected behavior). This is the output from script/autospec: http://pastie.org/private/bsbyyyppir7ica5moheqtg Just checked that ENV[''RSPEC''] get set using script/autotest (inside .autotest) puts ENV[''RSPEC''] Output: loading autotest/rails_rspec true When called from autotest directly, I get: loading autotest/rails_rspec nil Dunno if that helps. I''m using Rails 2.1.0 (from gems), RSpec and RSpec rails latest commits as plugins and ZenTest 3.10.0 -- 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