When I run autospec and I have a red example, autospec goes into an infinite loop and runs over and over until I get rid of the red. I hate this. I want my tests to just run once when my ruby file is saved - even if I have red examples. The infinite loop does not happen if my examples are all green, all yellow or a mix of green and yellow. I have tried ZenTest 3.11, Zentest 4.0, and autotest (http:// github.com/grosser/autotest/tree/master). Is there a way to make autospec run just once if it sees a red example? I am using rspec 1.2.2, platform: cygwin - testing a standalone ruby class. Thanks!!!
On Mon, Apr 6, 2009 at 4:50 PM, Arco <akleak at gmail.com> wrote:> When I run autospec and I have a red example, autospec goes into an > infinite loop and runs over and over until I get rid of the red. > > I hate this. ?I want my tests to just run once when my ruby file is > saved - even if I have red examples. > > The infinite loop does not happen if my examples are all green, all > yellow or a mix of green and yellow. > > I have tried ZenTest 3.11, Zentest 4.0, and autotest (http:// > github.com/grosser/autotest/tree/master). > > Is there a way to make autospec run just once if it sees a red > example? > > I am using rspec 1.2.2, platform: cygwin - testing a standalone ruby > class.What''s in your spec/spec.opts file?> > Thanks!!! > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky wrote:> On Mon, Apr 6, 2009 at 4:50 PM, Arco <akleak at gmail.com> wrote: >> github.com/grosser/autotest/tree/master). >> >> Is there a way to make autospec run just once if it sees a red >> example? >> >> I am using rspec 1.2.2, platform: cygwin - testing a standalone ruby >> class. > > What''s in your spec/spec.opts file?I get the same behavior.... my spec/spec.opts contains: --colour --format progress --loadby mtime --reverse I can reproduce in a new project... rails blog cd blog/ script/generate rspec script/generate rspec_scaffold posts title:string body:text rm -rf test/ rake db:create:all rake db:migrate rake db:test:prepare autospec # posts generated in plural to get error at beginning the loop runs forever -- Posted via http://www.ruby-forum.com/.
sorry my self reply... but I forgot to mention that I am running Ubuntu 8.10 ruby 1.8.7.xx -- Posted via http://www.ruby-forum.com/.
Do you have any files, which might be changed during your failing tests? Some temporary files or whatsoever? If that''s the case, then autotest thinks that you have made some changes already and tries to run again. Solution would be to put that file into ignore list for autotest. On Jun 10, 6:28?am, Alexandre Da silva <li... at ruby-forum.com> wrote:> sorry my self reply... but I forgot to mention that I am running Ubuntu > 8.10 ruby 1.8.7.xx > -- > Posted viahttp://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
Jarmo Pertman wrote:> Do you have any files, which might be changed during your failing > tests? Some temporary files or whatsoever? If that''s the case, then > autotest thinks that you have made some changes already and tries to > run again. Solution would be to put that file into ignore list for > autotest.No... all was working some days ago. in fact the same issue occurs with a new fresh project. Here is my test rails blogapp cd blogapp script/generate rspec script/generate rspec_scaffold posts title:string body:text rake db:migrate autospec This will cause error because posts is pluralized... so my autospec loops forever. all my applications are issuing the same behavior. I am with latest rspec and rspec-rails gems (1.2.6 I mean) when I back to my computer, I will provide a list of all my installed gems. -- Posted via http://www.ruby-forum.com/.
On 12 jun 2009, at 13:42, Alexandre Da Silva wrote:> Jarmo Pertman wrote: >> Do you have any files, which might be changed during your failing >> tests? Some temporary files or whatsoever? If that''s the case, then >> autotest thinks that you have made some changes already and tries to >> run again. Solution would be to put that file into ignore list for >> autotest. > > No... all was working some days ago.I have the same issue. Whether a red rspec or cucumber file, autotest goes beserk. Using the latest and greatest gems, on a fresh rails app. gr, bartz
Same for me. - Maur?cio Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Fri, Jun 12, 2009 at 10:59 AM, Bart Zonneveld<zuperinfinite at gmail.com> wrote:> > On 12 jun 2009, at 13:42, Alexandre Da Silva wrote: > >> Jarmo Pertman wrote: >>> >>> Do you have any files, which might be changed during your failing >>> tests? Some temporary files or whatsoever? If that''s the case, then >>> autotest thinks that you have made some changes already and tries to >>> run again. Solution would be to put that file into ignore list for >>> autotest. >> >> No... all was working some days ago. > > I have the same issue. Whether a red rspec or cucumber file, autotest goes > beserk. > Using the latest and greatest gems, on a fresh rails app. > > gr, > bartz > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Bart Zonneveld wrote:> On 12 jun 2009, at 13:42, Alexandre Da Silva wrote: > >> Jarmo Pertman wrote: >>> Do you have any files, which might be changed during your failing >>> tests? Some temporary files or whatsoever? If that''s the case, then >>> autotest thinks that you have made some changes already and tries to >>> run again. Solution would be to put that file into ignore list for >>> autotest. >> >> No... all was working some days ago. > > I have the same issue. Whether a red rspec or cucumber file, autotest > goes beserk. > Using the latest and greatest gems, on a fresh rails app. > > gr, > bartzit seems that many people are getting the same, at least for me and all developers from my two teams. yesterday I realise that when I have green results, then I modify my controller files, than rspec does not auto restart the tests. does anyone else having the same behavior? att, Alexandre -- Posted via http://www.ruby-forum.com/.
On Fri, Jun 12, 2009 at 6:42 AM, Alexandre Da Silva<lists at ruby-forum.com> wrote:> Jarmo Pertman wrote: >> Do you have any files, which might be changed during your failing >> tests? Some temporary files or whatsoever? If that''s the case, then >> autotest thinks that you have made some changes already and tries to >> run again. Solution would be to put that file into ignore list for >> autotest. > > No... all was working some days ago. > in fact the same issue occurs with a new fresh project. Here is my test > > rails blogapp > cd blogapp > script/generate rspec > script/generate rspec_scaffold posts title:string body:text > rake db:migrate > autospecI just copied this all into a shell and the specs ran only once and stopped, as expected. rspec-1.2.6 rspec-rails-1.2.6 ZenTest-4.1.1 Mac OS 10.5.7 ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] Anything different in your environment? Also, I tried this with and without some autotest exceptions set up in my ~/.autotest file, and it worked correctly in either case.> > > This will cause error because posts is pluralized... so my autospec > loops forever. > all my applications are issuing the same behavior. > > I am with latest rspec and rspec-rails gems (1.2.6 I mean) > when I back to my computer, I will provide a list of all my installed > gems. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky wrote:> On Fri, Jun 12, 2009 at 6:42 AM, Alexandre Da > Silva<lists at ruby-forum.com> wrote: >> rails blogapp >> cd blogapp >> script/generate rspec >> script/generate rspec_scaffold posts title:string body:text >> rake db:migrate >> autospec > > I just copied this all into a shell and the specs ran only once and > stopped, as expected. > > rspec-1.2.6 > rspec-rails-1.2.6 > ZenTest-4.1.1 > Mac OS 10.5.7 > ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] > > Anything different in your environment? > > Also, I tried this with and without some autotest exceptions set up in > my ~/.autotest file, and it worked correctly in either case.gems are the same... but I have a lot of other gems. I tested removing all gems and reinstaling one by one... after all gems installed (except remarkable gem) the test above ran as expected. After some inspects I found in different projects two possible sources of the problem. Source one: remarkable gem if you use remarkable, try do uninstall that gem and test if the testes continue looping Source two: localized_dates plugin if you use this plugin try removing it and run the tests again. I mean that localized_dates plugin is not needed in rails 2.3.3 anymore. -- Posted via http://www.ruby-forum.com/.
On Jun 13, 2009, at 11:19 PM, Alexandre Da Silva wrote:> David Chelimsky wrote: >> On Fri, Jun 12, 2009 at 6:42 AM, Alexandre Da >> Silva<lists at ruby-forum.com> wrote: >>> rails blogapp >>> cd blogapp >>> script/generate rspec >>> script/generate rspec_scaffold posts title:string body:text >>> rake db:migrate >>> autospec >> >> I just copied this all into a shell and the specs ran only once and >> stopped, as expected. >> >> rspec-1.2.6 >> rspec-rails-1.2.6 >> ZenTest-4.1.1 >> Mac OS 10.5.7 >> ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] >> >> Anything different in your environment? >> >> Also, I tried this with and without some autotest exceptions set up >> in >> my ~/.autotest file, and it worked correctly in either case. > > gems are the same... but I have a lot of other gems. I tested removing > all gems and reinstaling one by one... after all gems installed > (except > remarkable gem) the test above ran as expected. > > After some inspects I found in different projects two possible sources > of the problem. > > Source one: remarkable gem > if you use remarkable, try do uninstall that gem and test if the > testes > continue looping > > Source two: localized_dates plugin > if you use this plugin try removing it and run the tests again. I mean > that localized_dates plugin is not needed in rails 2.3.3 anymore.I don''t have these plugins or gems, but I found out that downgrading ZenTest to version 4.0.0 solved the problem. HTH, bartz
On Mon, Jun 15, 2009 at 7:18 AM, Bart Zonneveld<zuperinfinite at gmail.com> wrote:> > On Jun 13, 2009, at 11:19 PM, Alexandre Da Silva wrote: > >> David Chelimsky wrote: >>> >>> On Fri, Jun 12, 2009 at 6:42 AM, Alexandre Da >>> Silva<lists at ruby-forum.com> wrote: >>>> >>>> rails blogapp >>>> cd blogapp >>>> script/generate rspec >>>> script/generate rspec_scaffold posts title:string body:text >>>> rake db:migrate >>>> autospec >>> >>> I just copied this all into a shell and the specs ran only once and >>> stopped, as expected. >>> >>> rspec-1.2.6 >>> rspec-rails-1.2.6 >>> ZenTest-4.1.1 >>> Mac OS 10.5.7 >>> ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] >>> >>> Anything different in your environment? >>> >>> Also, I tried this with and without some autotest exceptions set up in >>> my ~/.autotest file, and it worked correctly in either case. >> >> gems are the same... but I have a lot of other gems. I tested removing >> all gems and reinstaling one by one... after all gems installed (except >> remarkable gem) the test above ran as expected. >> >> After some inspects I found in different projects two possible sources >> of the problem. >> >> Source one: remarkable gem >> if you use remarkable, try do uninstall that gem and test if the testes >> continue looping >> >> Source two: localized_dates plugin >> if you use this plugin try removing it and run the tests again. I mean >> that localized_dates plugin is not needed in rails 2.3.3 anymore. > > I don''t have these plugins or gems, but I found out that downgrading ZenTest > to version 4.0.0 solved the problem.Did you install the autotest-rails gem per the ZenTest 4.1 release notes?> > HTH, > bartz > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Jun 15, 2009, at 2:36 PM, David Chelimsky wrote:> On Mon, Jun 15, 2009 at 7:18 AM, Bart Zonneveld<zuperinfinite at gmail.com > > wrote: >> >> On Jun 13, 2009, at 11:19 PM, Alexandre Da Silva wrote: >> >>> David Chelimsky wrote: >>>> >>>> On Fri, Jun 12, 2009 at 6:42 AM, Alexandre Da >>>> Silva<lists at ruby-forum.com> wrote: >>>>> >>>>> rails blogapp >>>>> cd blogapp >>>>> script/generate rspec >>>>> script/generate rspec_scaffold posts title:string body:text >>>>> rake db:migrate >>>>> autospec >>>> >>>> I just copied this all into a shell and the specs ran only once and >>>> stopped, as expected. >>>> >>>> rspec-1.2.6 >>>> rspec-rails-1.2.6 >>>> ZenTest-4.1.1 >>>> Mac OS 10.5.7 >>>> ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] >>>> >>>> Anything different in your environment? >>>> >>>> Also, I tried this with and without some autotest exceptions set >>>> up in >>>> my ~/.autotest file, and it worked correctly in either case. >>> >>> gems are the same... but I have a lot of other gems. I tested >>> removing >>> all gems and reinstaling one by one... after all gems installed >>> (except >>> remarkable gem) the test above ran as expected. >>> >>> After some inspects I found in different projects two possible >>> sources >>> of the problem. >>> >>> Source one: remarkable gem >>> if you use remarkable, try do uninstall that gem and test if the >>> testes >>> continue looping >>> >>> Source two: localized_dates plugin >>> if you use this plugin try removing it and run the tests again. I >>> mean >>> that localized_dates plugin is not needed in rails 2.3.3 anymore. >> >> I don''t have these plugins or gems, but I found out that >> downgrading ZenTest >> to version 4.0.0 solved the problem. > > Did you install the autotest-rails gem per the ZenTest 4.1 release > notes?Of course not :). I just ran sudo gem update :). Will check, and report back though. gr, bartz
David Chelimsky wrote:> On Mon, Jun 15, 2009 at 7:18 AM, Bart Zonneveld<zuperinfinite at gmail.com> > wrote: >>>>> script/generate rspec >>>> Mac OS 10.5.7 >>> >> >> I don''t have these plugins or gems, but I found out that downgrading ZenTest >> to version 4.0.0 solved the problem. > > Did you install the autotest-rails gem per the ZenTest 4.1 release > notes?Same issue here.. Installed autotest-rails gem and everything is working fine now. Thanks. Carlos. -- Posted via http://www.ruby-forum.com/.
OK - top posting here so everyone on this thread will see this: If you upgrade to ZenTest 4.1, you must install the autotest-rails gem or you will get unexpected results. http://blog.davidchelimsky.net/2009/06/08/upgrading-to-zentest-410/ Cheers, David On Mon, Jun 15, 2009 at 9:18 AM, Carlos A. da silva<lists at ruby-forum.com> wrote:> David Chelimsky wrote: >> On Mon, Jun 15, 2009 at 7:18 AM, Bart Zonneveld<zuperinfinite at gmail.com> >> wrote: >>>>>> script/generate rspec >>>>> Mac OS 10.5.7 >>>> >>> >>> I don''t have these plugins or gems, but I found out that downgrading ZenTest >>> to version 4.0.0 solved the problem. >> >> Did you install the autotest-rails gem per the ZenTest 4.1 release >> notes? > > Same issue here.. > > Installed autotest-rails gem and everything is working fine now. > > Thanks. > > Carlos. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >