开发者

Stack overflow at LayoutLinks specs from railstutorial.org

I'm trying to follow THE magnificient Rails3 tutorial at http://railstutorial.org but ran into a problem in chapter 5.

How ironic, but i'm getting stack overflow running these LayoutLinks (http://railstutorial.org/chapters/filling-in-the-layout#sec:integration_tests) specs.

This is the output:

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

The code and specs ought to be the same as on that tutorial (i copy-pasted).

Any ideas what might be happening here?

I tried to run specs with -b to get more stacktrace but it didn't work for some reason.

I'm using Ruby 1.8.7, Rails 3.0.1 and RSpec 2.1.0 on Windows 7.


Seems like you are running into this Webrat issue: https://github.com/rspec/rspec-rails/issues#issue/140.

Try downgrading to Webrat 0.7.1 in your gemfile.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜