Ho appena aggiornato a Capybara 2.0.0.beta4 con RSpec-guide 2.11.4 e ho spostato la mia richiesta specifica (Ho solo una) per spec/features
come consigliato dal Capybara-Readme nella Repository RSpec-Rails. Quando eseguo i test ora non trova alcun percorso. Così, per il seguente blocco di prova:Capybara 2.0.0.beta4 ha undefined percorsi
it "should be able to access the signup page through the front page" do
visit root_path
click_link "Signup For Free Now"
page.should have_content("Signup")
end
ricevo il seguente messaggio di errore:
Failure/Error: visit root_path
NameError: undefined local variable or method `root_path' for #<RSpec...>
Quando provo ad eseguire il test con visit "/"
funziona benissimo. Altre versioni gemma sono:
- rotaie 3.2.1
- RSpec 2.11.0
- cremagliera-test 0.6.2
Tutte le idee per un motivo per il problema del cammino?
Le route indicate possono anche essere aggiunte se non si utilizza rspec: http://stackoverflow.com/questions/9475857/rspec-and-named-routes – cbron