Kristian Mandrup
2010-Jun-05 19:53 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
It seems there is no bin/autospec with RSpec 2. So I got it running simply with $ autotest Been looking at instructions here http://wiki.github.com/dchelimsky/rspec/autotest-integration And here http://ph7spot.com/musings/getting-started-with-autotest But... $ RSPEC=true autotest loading autotest/cucumber_rspec Error loading Autotest style autotest/cucumber_rspec (no such file to load -- autotest/rspec). Aborting. What do I do here? I want to run it in "only rspec" mode for the time being. Also if I try to add the "redgreen" plugin # /.autotest require "autotest/restart" $ autotest loading autotest/cucumber style: Cucumber /Users/kristianconsult/.rvm/gems/ruby-1.9.2-head/gems/redgreen-1.2.2/ lib/redgreen/autotest.rb:6:in `<top (required)>'': uninitialized constant Object::PLATFORM (NameError) Couldn''t find anything on the net related to this error. A ruby 1.9.2 issue?
David Chelimsky
2010-Jun-05 20:00 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Jun 5, 2010, at 3:53 PM, Kristian Mandrup wrote:> It seems there is no bin/autospec with RSpec 2. So I got it running > simply with $ autotest > > Been looking at instructions here http://wiki.github.com/dchelimsky/rspec/autotest-integration > > And here http://ph7spot.com/musings/getting-started-with-autotest > > But... > > $ RSPEC=true autotestDon''t use RSPEC=true for rspec-2. Also, probably need to set AUTOFEATURE=false.> loading autotest/cucumber_rspec > Error loading Autotest style autotest/cucumber_rspec (no such file to > load -- autotest/rspec). Aborting. > > What do I do here? I want to run it in "only rspec" mode for the time > being. > Also if I try to add the "redgreen" pluginYou don''t need this with rspec because rspec does it''s own colorizing. HTH, David> > # /.autotest > require "autotest/restart" > > $ autotest > loading autotest/cucumber > style: Cucumber > /Users/kristianconsult/.rvm/gems/ruby-1.9.2-head/gems/redgreen-1.2.2/ > lib/redgreen/autotest.rb:6:in `<top (required)>'': uninitialized > constant Object::PLATFORM (NameError) > > Couldn''t find anything on the net related to this error. A ruby 1.9.2 > issue?
Kristian Mandrup
2010-Jun-05 21:29 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Thanks again David :)> Don''t use RSPEC=true for rspec-2. > > Also, probably need to set AUTOFEATURE=false. >OK, when I run it like this $ AUTOFEATURE=false autotest I get an empty autotest output whenever I change and save a spec. The above lets me disable features, but how do I ENABLE specs with rspec 2 if I can''t use RSPEC=true?> > You don''t need this with rspec because rspec does it''s own colorizing.Great! I disabled redgreen from my .autotest file. Now I just need to get autotest working with RSpec 2 and coloring ;) PS: I added an RSpec 2 notes section to the bottom of the autotest instructions at: http://wiki.github.com/dchelimsky/rspec/autotest-integration I know... there is a separate wiki for the rspec account as well, but that wiki seems to have even less instructions. I would like to add some wiki info there when I get all this working!
Kristian Mandrup
2010-Jun-05 21:38 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
I found the solution here: http://blog.davidchelimsky.net/category/autotest/ -- As of beta.4, you?ll have to do add this configuration manually. Just create an autotest directory in the root of your project, put the following statement in ./autotest/discover.rb: Autotest.add_discovery { "rspec2" } The final 2.0.0 release will include a generator (even for non-rails projects) that will add this for you. -- $ AUTOFEATURE=false autotest (Not running features. To run features in autotest, set AUTOFEATURE=true.) loading autotest/rspec2 style: Rspec2
Kristian Mandrup
2010-Jun-05 22:08 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Thanks! I solved it all now and updated the RSpec 2 wiki about how to set it all up ;) http://wiki.github.com/rspec/rspec/autotest Hope these instructions provides a good base and is helpful to others!
Rob Eastwood
2010-Oct-15 11:39 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Kristian Mandrup wrote in post #917131:> Thanks! I solved it all now and updated the RSpec 2 wiki about how to > set it all up ;) > > http://wiki.github.com/rspec/rspec/autotest > > Hope these instructions provides a good base and is helpful to others!Hi Kristian, just wanted to pass on my appreciation for your efforts re documenting rspec & autotest. As a newcomer to rspec (1 week and lovin'' it!), thanks to your wiki post, I have now got this working. I almost had it, but your post sealed the deal. cheers Rob -- Posted via http://www.ruby-forum.com/.
Michelle Pace
2010-Dec-09 05:22 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Kristian Mandrup wrote in post #917121:> As of beta.4, you?ll have to do add this configuration manually. Just > create an autotest directory in the root of your project, put the > following statement in ./autotest/discover.rb: > > Autotest.add_discovery { "rspec2" }Hi Kristian (or anyone who can shed some light on this), I have followed the above instructions but to no avail. Looking at the output of my command prompt below is there something obvious I am doing incorrectly in getting autospec to work? I really would appreciate any suggestions. Thank-you in advance, Michelle C:\DEVELOPMENT\twits>cat autotest/discover.rb Autotest.add_discovery { ?rspec2? } C:\DEVELOPMENT\twits>ruby -v ruby 1.9.2p0 (2010-08-18) [i386-mingw32] C:\DEVELOPMENT\twits>gem list?local * LOCAL GEMS autotest (4.4.6) bundler (1.0.7) diff-lcs (1.1.2) git (1.2.5) jeweler (1.5.1) minitest (1.6.0) rake (0.8.7) rdiscount (1.6.5) rdoc (2.5.8) redcar (0.9.1) rspec (2.2.0) rspec-core (2.2.1) rspec-expectations (2.2.0) rspec-mocks (2.2.0) rubyzip (0.9.4) ZenTest (4.4.1) C:\DEVELOPMENT\twits>autospec ********************************************************** REMOVAL NOTICE: you are using behaviour that has been removed from rspec-2. * The ?autospec? command is no longer supported. * Please use ?autotest? insted. This message will be removed from a future version of rspec ********************************************************** -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Dec-09 12:19 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Dec 8, 2010, at 11:22 PM, Michelle Pace wrote:> Kristian Mandrup wrote in post #917121: >> As of beta.4, you?ll have to do add this configuration manually. Just >> create an autotest directory in the root of your project, put the >> following statement in ./autotest/discover.rb: >> >> Autotest.add_discovery { "rspec2" } > > > Hi Kristian (or anyone who can shed some light on this), > > I have followed the above instructions but to no avail. Looking at the > output of my command prompt below is there something obvious I am doing > incorrectly in getting autospec to work? I really would appreciate any > suggestions.The ZenTest/autotest gem world is a bit confusing right now. Here''s the deal: ZenTest-4.4.1 rolled autotest (mostly) back into ZenTest, but introduced a regression in which Autotest no longer sees ./autotest/discover.rb when running on Ruby 1.9.2. This is because Ruby 1.9.2 does not add "." to the $LOAD_PATH and, while autotest-4.4.5 (before it got rolled back to ZenTest) handled this, ZenTest-4.4.1 does not. Additionally, there is now an autotest-standalone gem (currently at 4.5.2), which _does_ handle the Ruby 1.9.2 situation correctly. In any of these cases, autotest''s --style/-s option works correctly. So your options are: # autotest-4.4.5 autotest # requires ./autotest/discover.rb autotest --style rspec2 # autotest-4.4.6 (with ZenTest-4.4.1) autotest --style rspec2 # autotest-standalone-4.5.2 autotest # requires ./autotest/discover.rb autotest --style rspec2 HTH, David> Thank-you in advance, > Michelle > > > C:\DEVELOPMENT\twits>cat autotest/discover.rb > Autotest.add_discovery { ?rspec2? } > > C:\DEVELOPMENT\twits>ruby -v > ruby 1.9.2p0 (2010-08-18) [i386-mingw32] > > C:\DEVELOPMENT\twits>gem list?local > * LOCAL GEMS > autotest (4.4.6) > bundler (1.0.7) > diff-lcs (1.1.2) > git (1.2.5) > jeweler (1.5.1) > minitest (1.6.0) > rake (0.8.7) > rdiscount (1.6.5) > rdoc (2.5.8) > redcar (0.9.1) > rspec (2.2.0) > rspec-core (2.2.1) > rspec-expectations (2.2.0) > rspec-mocks (2.2.0) > rubyzip (0.9.4) > ZenTest (4.4.1) > > C:\DEVELOPMENT\twits>autospec > ********************************************************** > REMOVAL NOTICE: you are using behaviour that has been > removed from rspec-2. > > * The ?autospec? command is no longer supported. > * Please use ?autotest? insted. > > This message will be removed from a future version of rspec > ********************************************************** > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-usersCheers, David
David Chelimsky
2010-Dec-09 12:34 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Dec 9, 2010, at 6:19 AM, David Chelimsky wrote:> > On Dec 8, 2010, at 11:22 PM, Michelle Pace wrote: > >> Kristian Mandrup wrote in post #917121: >>> As of beta.4, you?ll have to do add this configuration manually. Just >>> create an autotest directory in the root of your project, put the >>> following statement in ./autotest/discover.rb: >>> >>> Autotest.add_discovery { "rspec2" } >> >> >> Hi Kristian (or anyone who can shed some light on this), >> >> I have followed the above instructions but to no avail. Looking at the >> output of my command prompt below is there something obvious I am doing >> incorrectly in getting autospec to work? I really would appreciate any >> suggestions. > > The ZenTest/autotest gem world is a bit confusing right now. Here''s the deal: > > ZenTest-4.4.1 rolled autotest (mostly) back into ZenTest, but introduced a regression in which Autotest no longer sees ./autotest/discover.rb when running on Ruby 1.9.2. This is because Ruby 1.9.2 does not add "." to the $LOAD_PATH and, while autotest-4.4.5 (before it got rolled back to ZenTest) handled this, ZenTest-4.4.1 does not. > > Additionally, there is now an autotest-standalone gem (currently at 4.5.2), which _does_ handle the Ruby 1.9.2 situation correctly. > > In any of these cases, autotest''s --style/-s option works correctly. So your options are: > > # autotest-4.4.5 > autotest # requires ./autotest/discover.rb > autotest --style rspec2 > > # autotest-4.4.6 (with ZenTest-4.4.1) > autotest --style rspec2 > > # autotest-standalone-4.5.2 > autotest # requires ./autotest/discover.rb > autotest --style rspec2FYI - I filed a bug report in the ZenTest tracker [1], so hopefully this will get resolved in a future release of ZenTest. [1] http://rubyforge.org/tracker/?func=detail&aid=28775&group_id=419&atid=1678> HTH, > David > >> Thank-you in advance, >> Michelle >> >> >> C:\DEVELOPMENT\twits>cat autotest/discover.rb >> Autotest.add_discovery { ?rspec2? } >> >> C:\DEVELOPMENT\twits>ruby -v >> ruby 1.9.2p0 (2010-08-18) [i386-mingw32] >> >> C:\DEVELOPMENT\twits>gem list?local >> * LOCAL GEMS >> autotest (4.4.6) >> bundler (1.0.7) >> diff-lcs (1.1.2) >> git (1.2.5) >> jeweler (1.5.1) >> minitest (1.6.0) >> rake (0.8.7) >> rdiscount (1.6.5) >> rdoc (2.5.8) >> redcar (0.9.1) >> rspec (2.2.0) >> rspec-core (2.2.1) >> rspec-expectations (2.2.0) >> rspec-mocks (2.2.0) >> rubyzip (0.9.4) >> ZenTest (4.4.1) >> >> C:\DEVELOPMENT\twits>autospec >> ********************************************************** >> REMOVAL NOTICE: you are using behaviour that has been >> removed from rspec-2. >> >> * The ?autospec? command is no longer supported. >> * Please use ?autotest? insted. >> >> This message will be removed from a future version of rspec >> ********************************************************** >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > Cheers, > David > > >Cheers, David
Michelle Pace
2010-Dec-09 13:08 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
David Chelimsky wrote in post #967405:> # autotest-4.4.6 (with ZenTest-4.4.1) > autotest --style rspec2Sorry David, truth be told I''m a ruby newbie working my way through the new book "Continuous Testing with Ruby" so I''m a bit in the dark here. For what you mention above, where do I put these settings since obviously not in discover.rb? Thanks in advance, Michelle -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Dec-09 13:30 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Thu, Dec 9, 2010 at 7:08 AM, Michelle Pace <lists at ruby-forum.com> wrote:> David Chelimsky wrote in post #967405: >> # autotest-4.4.6 (with ZenTest-4.4.1) >> autotest --style rspec2 > > Sorry David, truth be told I''m a ruby newbie working my way > through the new book "Continuous Testing with Ruby" so I''m a bit in the > dark here. > > For what you mention above, where do I put these settings since > obviously not in discover.rb?These are commands you''d run from the command line. If you use the --style option, you don''t need to worry about having ./autotest/discover.rb: $ autotest --style rspec2 This works with any of autotest-4.4.5, 4.4.6, and autotest-standalone-4.5.1. If you want to use ./autotest/discover.rb to tell autotest to use rspec instead of typing it on the command line, that only works with autotest-4.4.5 and autotest-standalone-4.5.1 (if you''re using ruby-1.9, that is - if you''re using ruby 1.8, it works with all three versions): $ autotest HTH, David> > Thanks in advance, Michelle > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Michelle Pace
2010-Dec-10 01:58 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Hi David, sorry still no coconut. I should have explained myself better, I actually need to run the "autospec" command as the book says: "Thankfully, RSpec comes with a small script named autospec that reconfigures autotest to run specs instead, so try that..." So in the below I tried using your " --style rspec2" command for both autotest and *autospec*. Any ideas how I get autospec to run? C:\DEVELOPMENT\twits>autospec --style rspec2 ************************************************************ REMOVAL NOTICE: you are using behaviour that has been removed from rspec-2. * The ''autospec'' command is no longer supported. * Please use ''autotest'' insted. This message will be removed from a future version of rspec. ************************************************************ C:\DEVELOPMENT\twits>autotest --style rspec2 loading autotest/rspec2 bundle exec C:\devtools\Ruby192\bin\ruby -S C:/devtools/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2 .2.1/bin/rspec --tty ''C:/DEVELOPMENT/twits/spec/twits_spec.rb'' Could not find gem ''rspec (~> 2.1.0, runtime)'' in any of the gem sources listed in your Gemfile. Interrupt a second time to quit Terminate batch job (Y/N)? y Another quotation from this book which is sending me crazy: "Using RSpec 2? ----------------- The autospec command has been removed from RSpec 2, so if you?ve upgraded, you?ll need to do something a little different. You?re going to want to create a directory tree in the root of your project named autotest/.autotest. Then inside that you need to create a file named discover.rb. To that file we?ll need to add the statement Autotest.add_discovery { "rspec2" }." http://www.pragprog.com/titles/rcctr/continuous-testing-with-ruby Thanks again, Michelle -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Dec-10 02:38 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Thu, Dec 9, 2010 at 7:58 PM, Michelle Pace <lists at ruby-forum.com> wrote:> Hi David, sorry still no coconut. I should have explained myself better, > I actually need to run the "autospec" command as the book says: > "Thankfully, RSpec comes with a small script named autospec that > reconfigures autotest to run specs instead, so try that..." > > So in the below I tried using your " --style rspec2" command for both > autotest and *autospec*. Any ideas how I get autospec to run? > > > C:\DEVELOPMENT\twits>autospec --style rspec2 > ************************************************************ > REMOVAL NOTICE: you are using behaviour that has been > removed from rspec-2. > > * The ''autospec'' command is no longer supported. > * Please use ''autotest'' insted. > > This message will be removed from a future version of rspec. > ************************************************************ > > > C:\DEVELOPMENT\twits>autotest --style rspec2 > loading autotest/rspec2 > bundle exec C:\devtools\Ruby192\bin\ruby -S > C:/devtools/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2 > .2.1/bin/rspec --tty ''C:/DEVELOPMENT/twits/spec/twits_spec.rb'' > Could not find gem ''rspec (~> 2.1.0, runtime)'' in any of the gem sources > listed in your Gemfile. > Interrupt a second time to quit > Terminate batch job (Y/N)? y > > > Another quotation from this book which is sending me crazy: > ?"Using RSpec 2? > ?----------------- > ?The autospec command has been removed from RSpec 2, so > ?if you?ve upgraded, you?ll need to do something a little different. > ?You?re going to want to create a directory tree in the root > ?of your project named autotest/.autotest.This is wrong ^^. The directory should be named autotest, and the file named discover.rb. So if the project is at /home/michelle/my_project, you''d want /home/michelle/my_project/autotest/discover.rb, with: Autotest.add_discovery { "rspec2" } Then, from the /home/michelle/my_project directory, just type this: autotest Try that - it should work with autotest-4.4.5 (make sure you remove the ZenTest gem). HTH, David> Then inside that you > ?need to create a file named discover.rb. To that file we?ll need to > ?add the statement Autotest.add_discovery { "rspec2" }." > ?http://www.pragprog.com/titles/rcctr/continuous-testing-with-ruby> > Thanks again, > Michelle > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Michelle Pace
2010-Dec-10 07:18 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Thanks (again) Dave for your reply and the time you''ve taken. However I think I must be really bad at explaining myself... so I''ve drawn a picture for you which to show my problem. [One of the requirements in the book is that I have to have ZenTest installed.] http://michellepace.com/pics/autospec-problem.jpg Again, any suggestions on how to get this working would really be appreciated. Michelle -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Dec-10 12:56 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Dec 10, 2010, at 1:18 AM, Michelle Pace wrote:> Thanks (again) Dave for your reply and the time you''ve taken. > > However I think I must be really bad at explaining myself... so I''ve > drawn a picture for you which to show my problem. [One of the > requirements in the book is that I have to have ZenTest installed.]You''re explaining yourself just fine. The problem is that you''re listening 1/2 to the book and 1/2 to me, but you need to just listen to me right now :) The problem is as follows: * the book uses ruby-1.8 * you are using ruby-1.9 * ruby-1.8 includes "." on the $LOAD_PATH * ruby-1.9 does _not_ include "." on the $LOAD_PATH * ZenTest-4.4.1 does _not_ add "." to the $LOAD_PATH * these last two ^^ mean that if you''re using ruby-1.9, rspec-2, and ZenTest-4.4.1, the autotest command that ships with ZenTest will not find ''./autotest/discover.rb'' and will not load the correct class * per the error message you got when you ran autospec, autospec has been removed from rspec-2, so you have to use the autotest command Any of the following combinations _will_ work: 1) Run the following commands $ gem uninstall ZenTest $ gem uninstall autotest $ gem install autotest -v 4.4.5 $ autotest Again, use autotest, not autospec. autotest-4.4.5 is a standalone autotest gem that does not require ZenTest. This will work using the autotest/discover.rb file because autotest-4.4.5 adds "." to the $LOAD_PATH. 2) $ gem uninstall autotest $ gem install ZenTest At this point you have the book''s recommended setup, but the autotest command will not see autotest/discover.rb. Your options are: a) add "." to the $LOAD_PATH yourself $ ruby -I . -S autotest The -I option tells ruby to add its argument (''.'') to the command line. The -S option tells ruby what script to run (autotest). b) Use autotest''s --style option $ autotest --style rspec2 This bypasses the search for autotest/discover.rb (so you can delete it if you''re using this) and "just works." There are other options, but I don''t want to confuse you any further. I really hope this clears things up. Also, I''ve reported this issue to the ZenTest project, so there is some chance that ZenTest-4.4.2 will add "." to the $LOAD_PATH, at which point the material in the book will work as written (except that the file is "autotest/discover.rb", not "autotest/.autotest/discover.rb") with ruby-1.9. Good luck! Cheers, David> > http://michellepace.com/pics/autospec-problem.jpg > > Again, any suggestions on how to get this working would really be > appreciated. > > Michelle > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-usersCheers, David
Rick DeNatale
2010-Dec-10 14:25 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Michelle, I think that the problem is that after that setup you want to use the command autotest and NOT autospec The book pages you have in your picture say that autospec has been removed from rspec2 but don''t state explicitly that you should use the autotest command rather than autospec. Since "Continuous Testing with Ruby" is a beta book (first time I''ve heard of it I must say), the authors would probably appreciate it if you posted an erratum to the book''s site. On Fri, Dec 10, 2010 at 2:18 AM, Michelle Pace <lists at ruby-forum.com> wrote:> Thanks (again) Dave for your reply and the time you''ve taken. > > However I think I must be really bad at explaining myself... so I''ve > drawn a picture for you which to show my problem. [One of the > requirements in the book is that I have to have ZenTest installed.] > > http://michellepace.com/pics/autospec-problem.jpg > > Again, any suggestions on how to get this working would really be > appreciated. > > Michelle > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale
David Chelimsky
2010-Dec-11 15:54 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Fri, Dec 10, 2010 at 6:56 AM, David Chelimsky <dchelimsky at gmail.com> wrote:> > On Dec 10, 2010, at 1:18 AM, Michelle Pace wrote: > >> Thanks (again) Dave for your reply and the time you''ve taken. >> >> However I think I must be really bad at explaining myself... so I''ve >> drawn a picture for you which to show my problem. [One of the >> requirements in the book is that I have to have ZenTest installed.] > > You''re explaining yourself just fine. The problem is that you''re listening 1/2 to the book and 1/2 to me, but you need to just listen to me right now :) > > The problem is as follows: > > * the book uses ruby-1.8 > * you are using ruby-1.9 > * ruby-1.8 includes "." on the $LOAD_PATH > * ruby-1.9 does _not_ include "." on the $LOAD_PATH > * ZenTest-4.4.1 does _not_ add "." to the $LOAD_PATH > * these last two ^^ mean that if you''re using ruby-1.9, rspec-2, and ZenTest-4.4.1, the autotest command that ships with ZenTest will not find ''./autotest/discover.rb'' and will not load the correct class > * per the error message you got when you ran autospec, autospec has been removed from rspec-2, so you have to use the autotest command > > Any of the following combinations _will_ work: > > 1) Run the following commands > $ gem uninstall ZenTest > $ gem uninstall autotest > $ gem install autotest -v 4.4.5 > $ autotest > > Again, use autotest, not autospec. autotest-4.4.5 is a standalone autotest gem that does not require ZenTest. This will work using the autotest/discover.rb file because autotest-4.4.5 adds "." to the $LOAD_PATH. > > 2) > $ gem uninstall autotest > $ gem install ZenTest > > At this point you have the book''s recommended setup, but the autotest command will not see autotest/discover.rb. Your options are: > > a) add "." to the $LOAD_PATH yourself > $ ruby -I . -S autotest > > The -I option tells ruby to add its argument (''.'') to the command line. The -S option tells ruby what script to run (autotest). > > b) Use autotest''s --style option > $ autotest --style rspec2 > > This bypasses the search for autotest/discover.rb (so you can delete it if you''re using this) and "just works." > > There are other options, but I don''t want to confuse you any further. I really hope this clears things up. > > Also, I''ve reported this issue to the ZenTest project, so there is some chance that ZenTest-4.4.2 will add "." to the $LOAD_PATH, at which point the material in the book will work as written (except that the file is "autotest/discover.rb", not "autotest/.autotest/discover.rb") with ruby-1.9. > > Good luck!FYI - Ryan Davis, in spite of his clear distaste for the approach [1], just released ZenTest-4.4.2, which fixes this issue. Cheers, David [1] https://github.com/seattlerb/zentest/commit/e9de80cbc5cca1026197dcb0f3612cf330491556> > Cheers, > David > > > >> >> http://michellepace.com/pics/autospec-problem.jpg >> >> Again, any suggestions on how to get this working would really be >> appreciated. >> >> Michelle >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > Cheers, > David > > > >
Luis Lavena
2010-Dec-11 16:38 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Sat, Dec 11, 2010 at 12:54 PM, David Chelimsky <dchelimsky at gmail.com> wrote:> > FYI - Ryan Davis, in spite of his clear distaste for the approach [1], > just released ZenTest-4.4.2, which fixes this issue. >Now that .rspec file is the recommended way of providing options for RSpec2, can we use that to detect discovery? Just a suggestion to avoid these type of conversations ;-) Here is Bacon approach, checking for .bacon file https://github.com/chneukirchen/bacon/blob/master/lib/autotest/discover.rb -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
David Chelimsky
2010-Dec-11 17:33 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Dec 11, 2010, at 10:38 AM, Luis Lavena wrote:> On Sat, Dec 11, 2010 at 12:54 PM, David Chelimsky <dchelimsky at gmail.com> wrote: >> >> FYI - Ryan Davis, in spite of his clear distaste for the approach [1], >> just released ZenTest-4.4.2, which fixes this issue. >> > > Now that .rspec file is the recommended way of providing options for > RSpec2, can we use that to detect discovery? > > Just a suggestion to avoid these type of conversations ;-) > > Here is Bacon approach, checking for .bacon file > > https://github.com/chneukirchen/bacon/blob/master/lib/autotest/discover.rbOne step ahead of you :) https://github.com/rspec/rspec-core/commit/dc1b0d53fde7505bb5769884e5c54b09b6886f89> -- > Luis LavenaCheers, David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20101211/1f392a5d/attachment.html>
Luis Lavena
2010-Dec-11 19:33 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Sat, Dec 11, 2010 at 2:33 PM, David Chelimsky <dchelimsky at gmail.com> wrote:> > > One step ahead of you :) > https://github.com/rspec/rspec-core/commit/dc1b0d53fde7505bb5769884e5c54b09b6886f89 >I''m going to beat your speed record David, some day.. some day :-) PS: Thank you :-D -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Michelle Pace
2010-Dec-14 13:15 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
David Chelimsky wrote in post #967835:> ZenTest-4.4.2 will add "." to the $LOAD_PATH, at which point the > material in > the book will work as written (except that the file is > "autotest/discover.rb", not > "autotest/.autotest/discover.rb") with ruby-1.9.Ok - I have updated to ZenTest-4.4.2, I''ve made sure that I have autotest/discover.rb and that I use ''autotest'' in place of ''autospec''...I''m sorry to say it, but iis still not ''verking: C:\DEVELOPMENT\twits>autotest loading autotest/rspec2 bundle exec C:\devtools\Ruby192\bin\ruby -S C:/devtools/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2 .3.0/bin/rspec --tty ''C:/DEVELOPMENT/twits/spec/twits_spec.rb'' Could not find gem ''rspec (~> 2.1.0, runtime)'' in any of the gem sources listed in your Gemfile. Interrupt a second time to quit Terminate batch job (Y/N)? ^C C:\DEVELOPMENT\twits>ls spec/* spec/spec_helper.rb spec/twits_spec.rb :) sorry David... but got any more pointers for me?? -- Posted via http://www.ruby-forum.com/.
Luis Lavena
2010-Dec-14 14:18 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Tue, Dec 14, 2010 at 10:15 AM, Michelle Pace <lists at ruby-forum.com> wrote:> > Ok - I have updated to ZenTest-4.4.2, I''ve made sure that I have > autotest/discover.rb and that I use ''autotest'' in place > of ''autospec''...I''m sorry to say it, but iis still not ''verking: > > C:\DEVELOPMENT\twits>autotest > loading autotest/rspec2 > bundle exec C:\devtools\Ruby192\bin\ruby -S > C:/devtools/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2 > .3.0/bin/rspec --tty ''C:/DEVELOPMENT/twits/spec/twits_spec.rb'' > Could not find gem ''rspec (~> 2.1.0, runtime)'' in any of the gem sources > listed in your Gemfile.The error is there, did you update your Gemfile definitions to the latest version and run bundle update rpsec or bundle update rspec-rails? -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Michelle Pace
2010-Dec-14 16:38 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Luis Lavena wrote in post #968298:> On Tue, Dec 14, 2010 at 10:15 AM, Michelle Pace <lists at ruby-forum.com> > wrote: >> Could not find gem ''rspec (~> 2.1.0, runtime)'' in any of the gem sources >> listed in your Gemfile. > > The error is there, did you update your Gemfile definitions to the > latest version and run bundle update rpsec or bundle update > rspec-rails?Thanks Luis, I''m completely new with this... mmm - no? All I ran was "%gem update" and thought that would do it as it now returns with "Nothing to update". How do I go about updating my "gemfile definitions"? -- Posted via http://www.ruby-forum.com/.
Luis Lavena
2010-Dec-14 19:36 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
On Tue, Dec 14, 2010 at 1:38 PM, Michelle Pace <lists at ruby-forum.com> wrote:> > Thanks Luis, I''m completely new with this... mmm - no?Are you following a Rails guide? didn''t the guide mention something about a Gemfile?> All I ran was "%gem update" and thought that would do it as it now > returns with "Nothing to update". How do I go about updating my "gemfile > definitions"? >You''re using Bundler, bundler needs a "manifest" of gems and versions that your application use. Look for "Gemfile" in the root of your application. More information in Bundler website: http://gembundler.com/ -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Michelle Pace
2010-Dec-15 01:59 UTC
[rspec-users] Problems running RSpec 2 with autotest/autospec
Luis Lavena wrote in post #968399:> You''re using Bundler, bundler needs a "manifest" of gems and versions > that your application use. Look for "Gemfile" in the root of your > application.*yay*! Thanks Luis (and David) for all your patience. I''ve finally got it working and can now go onto Page 19 of this book. I looked for the automatically generated gemfile and found that it was completely out of date with version numbers so I updated it to the versions I have. Thanks again for all the help and putting up with my new-be-ness. Cheers, Michelle THE OLD (ORIGINAL): ----------------------------------- group :development do gem "rspec", "~> 2.1.0" gem "bundler", "~> 1.0.0" gem "jeweler", "~> 1.5.1" gem "rcov", ">= 0" end I CHANGED IT TO THIS AND IT WORKS: ----------------------------------- group :development do gem "rspec", "~> 2.3.0" gem "bundler", "~> 1.0.7" gem "jeweler", "~> 1.5.1" gem "rcov", ">= 0" end -- Posted via http://www.ruby-forum.com/.