L'exécution de Capybara sans rack produit des erreurs lors de l'utilisation de paramètres d'url

Voici ma configuration sur la base de cette recommandation: Comment obtenir Concombre/Capybara/Mécaniser le travail contre les non-rails site

Il fonctionne jusqu'à ce que je ajouter des paramètres à l'URL. Des conseils sur la façon d'aborder ce problème?

require 'rspec'
require 'capybara/rspec'
require 'capybara/dsl'

@test_url = "test"

RSpec.configure do |config|
  config.include Capybara::DSL
end

Capybara.configure do |config|
  config.run_server = false
  config.current_driver = :selenium
  config.app = "fake app name"
  config.app_host = "http://site.com/#{@test_url}"
end

Cela fonctionne bien:

describe "the page, without URL parameters" do
  it "shows the regular form" do
    visit "/registration.aspx"
    page.should have_content "YES"    
  end
end

Mais c':

describe "the page, when not fully pre-filled" do
  it "shows the regular form if only passed the attendance" do
    visit "/registration.aspx?r=y"
    page.should have_content "YES"    
  end

  it "shows the regular form if only passed the attendance" do
    visit "/registration.aspx?f=Jim"
    page.should have_content "YES"    
  end

end

résultats dans

....FF

Failures:

  1) the page, when not fully pre-filled shows the regular form if only passed the attendance
     Failure/Error: visit "/registration.aspx?r=y"
     NoMethodError:
       undefined method `call' for "fake app name":String
     # ./conf_spec.rb:39:in `block (2 levels) in <top (required)>'

  2) the page, when not fully pre-filled shows the regular form if only passed the attendance
     Failure/Error: visit "/registration.aspx?f=Jim"
     NoMethodError:
       undefined method `call' for "fake app name":String
     # ./conf_spec.rb:44:in `block (2 levels) in <top (required)>'
Supprimer config.app de configuration.
Andrey, j'ai commenté la ligne et maintenant je suis arriver "ArgumentError: rack-test nécessite une application de rack, mais aucune n'a été donné"
Vous devez définir default_driver de sélénium au lieu de current_driver
Merci, Andreï, cela a résolu mon problème. N'hésitez pas à apporter comme une réponse afin que je puisse le sélectionner.
C'est fait.

OriginalL'auteur aaandre | 2013-07-16