Rspec在rails教程中给出了我的布局链接错误:“失败/错误:无法从backtrace中找到匹配的行”

时间:2010-10-20 20:07:45

标签: ruby-on-rails-3 rspec

同样的问题,但解决方案不起作用,我已经尝试了几个版本的rspec: Why is Rspec saying "Failure/Error: Unable to find matching line from backtrace"?

dpalacio:sample_app dpalacio$ rspec -v
2.0.0.beta.18
dpalacio:sample_app dpalacio$ rspec spec/
controllers/    factories.rb    models/         requests/       spec_helper.rb  
dpalacio:sample_app dpalacio$ rspec spec/requests/
FFFFF

Finished in 0.55501 seconds
5 examples, 5 failures

1) LayoutLinks should have a Home page at '/'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

2) LayoutLinks should have a Contact page at '/contact'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

3) LayoutLinks should have an About page at '/about'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

4) LayoutLinks should have a Help page at '/help'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

5) LayoutLinks should have a Help page at '/signup'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

与2.0.1版本相同:

dpalacio:sample_app dpalacio$ rspec -v
2.0.1
dpalacio:sample_app dpalacio$ rspec spec/
controllers/    factories.rb    models/         requests/       spec_helper.rb  
dpalacio:sample_app dpalacio$ rspec spec/requests/
FFFFF

Finished in 0.55501 seconds
5 examples, 5 failures

1) LayoutLinks should have a Home page at '/'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

2) LayoutLinks should have a Contact page at '/contact'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

3) LayoutLinks should have an About page at '/about'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

4) LayoutLinks should have a Help page at '/help'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

5) LayoutLinks should have a Help page at '/signup'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

3 个答案:

答案 0 :(得分:2)

好的发现了问题,问题不是RSPEC而是WEBRAT。 添加到您的Gemfile:

gem'webrat','0.7.1'

RSPEC的版本应为: 宝石'rspec','2.0.1'

答案 1 :(得分:2)

很难将此视为(纯粹的)网络问题......

组:测试,:开发做   gem'rspec-rails','2.0.0.beta.18'
  宝石'水豚'   gem'database_cleaner'
  宝石'黄瓜 - 铁轨'   宝石'黄瓜'   宝石'spork'
  宝石'launchy' 端

...因为我使用的是capybara而不是webrat。

欢迎任何想法。

答案 2 :(得分:0)

这似乎不是 rspec 2.2.0

的问题