0
我試圖跟隨宏偉Rails3中教程在http://railstutorial.org但遇到了一個問題在第5章堆棧溢出從railstutorial.org
多麼諷刺,但我發現在運行這些LayoutLinks堆棧溢出(http://railstutorial.org/chapters/filling-in-the-layout#sec:integration_tests)規格。
這是輸出:
C:\sample_app>rspec spec\requests\layout_links_spec.rb
FFFFFF
Failures:
1) LayoutLinks should have a Home page at '/'
Failure/Error: response.should have_selector('title', :content => "Home")
stack level too deep
# ./spec/requests/layout_links_spec.rb:7
2) LayoutLinks should have a Contact page at '/contact'
Failure/Error: response.should have_selector('title', :content => "Contact")
stack level too deep
# ./spec/requests/layout_links_spec.rb:12
3) LayoutLinks should have an About page at '/about'
Failure/Error: response.should have_selector('title', :content => "About")
stack level too deep
# ./spec/requests/layout_links_spec.rb:17
4) LayoutLinks should have a Help page at '/help'
Failure/Error: response.should have_selector('title', :content => "Help")
stack level too deep
# ./spec/requests/layout_links_spec.rb:22
5) LayoutLinks should have a Help page at '/help'
Failure/Error: response.should have_selector('title', :content => "Help")
stack level too deep
# ./spec/requests/layout_links_spec.rb:27
6) LayoutLinks should have a signup page at '/signup'
Failure/Error: response.should have_selector('title', :content => "Sign up")
stack level too deep
# ./spec/requests/layout_links_spec.rb:32
Finished in 206.38 seconds
6 examples, 6 failures
的代碼和規格應該是相同於該教程(ⅰ複製粘貼)。
任何想法可能發生在這裏?
我試圖用-b運行規格以獲得更多堆棧跟蹤,但由於某種原因它不起作用。
我使用Ruby 1.8.7,Rails的3.0.1和RSpec 2.1.0在Windows 7
Woho,就是這樣!謝謝你的提示! – 2010-11-10 22:14:31