On Thu, Dec 9, 2010 at 7:58 PM, Michelle Pace <li...@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@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to