Forum: RSpec Autotest doesn't load up rspec (rspec2, rails3, ruby 1.9.2)

Posted by Nils Riedemann (Guest)
on 2010-08-18 07:23
(Received via mailing list)
Hi there,

When i run `rspec --drb spec` everything works fine. Yet, when i want
to use `autotest` it outputs the following:

    ~/code/ffr[master]% autotest
    /Users/nilsriedemann/.rvm/rubies/ruby-1.9.2-rc2/lib/ruby/1.9.1/
rubygems.rb:1051: warning: method redefined; discarding old gem
    <internal:gem_prelude>:15: warning: previous definition of gem was
here
    loading autotest/rails

The contents of my ./autotest/discover.rb:

    Autotest.add_discovery { "rspec2" }
    Autotest.add_discovery { "rails" }


(btw: `autospec` does not work at all… but that's a different story i
think.)
Posted by David Chelimsky (Guest)
on 2010-08-18 07:29
(Received via mailing list)
On Aug 17, 2010, at 3:18 AM, Nils Riedemann wrote:

>    loading autotest/rails
> 
> The contents of my ./autotest/discover.rb:
> 
>    Autotest.add_discovery { "rspec2" }
>    Autotest.add_discovery { "rails" }
> 
> 
> (btw: `autospec` does not work at all… but that's a different story i
> think.)

Autospec is gone. See 
http://blog.davidchelimsky.net/2010/03/15/rspec-2-and-autotest/.

Have you installed the autotest-rails gem? What's in your Gemfile?
Posted by Nils Riedemann (Guest)
on 2010-08-18 11:09
(Received via mailing list)
On 18 Aug., 07:29, David Chelimsky <dchelim...@gmail.com> wrote:
>
> >    Autotest.add_discovery { "rails" }
> rspec-us...@rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
I have autotest-rails (4.1.0) installed. My Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.0.rc'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql'
# gem 'sqlite3-ruby', :require => 'sqlite3'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
gem 'capistrano'

# To use debugger
# gem 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri', '1.4.1'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
gem "geokit", '>= 1.5.0'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :development, :test do
  gem 'rspec', ">= 2.0.0.beta.18"
  gem 'rspec-rails', ">= 2.0.0.beta.18"
  gem 'factory_girl_rails'
  gem 'shoulda'
  gem 'spork'
  gem 'webrat'
end

group :test do
  gem 'rspec', ">= 2.0.0.beta.18"
  gem 'rspec-rails', ">= 2.0.0.beta.18"
  gem 'factory_girl_rails'
  gem 'shoulda'
  gem 'spork'
  gem 'webrat'
end
Posted by David Chelimsky (Guest)
on 2010-08-18 15:29
(Received via mailing list)
On Aug 18, 2010, at 3:56 AM, Nils Riedemann wrote:

>>> When i run `rspec --drb spec` everything works fine. Yet, when i want
>> 
>> _______________________________________________
> # gem 'rails', :git => 'git://github.com/rails/rails.git'
> # To use debugger
> # put test-only gems in this group so their generators
> group :test do
>  gem 'rspec', ">= 2.0.0.beta.18"
>  gem 'rspec-rails', ">= 2.0.0.beta.18"
>  gem 'factory_girl_rails'
>  gem 'shoulda'
>  gem 'spork'
>  gem 'webrat'
> end

I don't think this is the source of your issue, but why do you have all 
of the testing related gems duplicated? Also, beta 18 doesn't work with 
rails-3.0.0.rc, so that should say ">= 2.0.0.beta.19"

As for this issue, I'm not sure what else is up. Is anybody else on this 
list having a similar issue?
Posted by David Chelimsky (Guest)
on 2010-08-18 15:32
(Received via mailing list)
On Aug 18, 2010, at 8:28 AM, David Chelimsky wrote:

>>>> Hi there,
>>> 
>>> Have you installed the autotest-rails gem? What's in your Gemfile?
>> 
>> gem 'capistrano'
>> 
>> end
> I don't think this is the source of your issue, but why do you have all of the testing related gems duplicated? Also, beta 18 doesn't work with rails-3.0.0.rc, so that should say ">= 2.0.0.beta.19"
> 
> As for this issue, I'm not sure what else is up. Is anybody else on this list having a similar issue?

FYI - I've been able to reproduce the issue - but I'm not sure what the 
problem is yet and I'm off for the day. Would you mind posting this as 
an issue to github? http://github.com/rspec/rspec-rails/issues.

Cheers,
David
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.