[rspec-users] undefined method `has_selector?' for "":String

Lord Raiden lists at ruby-forum.com
Sun Sep 19 13:44:02 EDT 2010

I'm running rails 3.0.0 on ruby 1.9.2p0.

I've rspec beta 22 with Capybara 0.3.9. NO WEBRAT.

I'm unable to use 'rendered.should have_selector('a') in my view specs.

  1) home/_menu.erb should add a link to home first
     Failure/Error: rendered.should have_selector('a', 'Home')
     undefined method `has_selector?' for "":String

I read in this forum that rspec beta 20 and above should pick Capybara
automatically if its included in Gemfile.

In my gem file I've this:

group :development, :test do
  gem 'database_cleaner'
  gem 'cucumber-rails'
  gem 'cucumber'
  gem 'rspec-rails', ">= 2.0.0.beta.19"
  gem 'capybara'
  gem 'spork'
  gem 'launchy'    # So you can do Then show me the page
  gem 'machinist', '>= 2.0.0.beta1'

Can anyone please point out what am I missing here? Thanks in advance.
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list