2010-10-20 49 views
0

同樣的問題,但解決方案沒有工作:,我已經嘗試了幾個版本的rspec: Why is Rspec saying "Failure/Error: Unable to find matching line from backtrace"?Rspec給我的佈局鏈接從rails教程錯誤:「失敗/錯誤:無法找到匹配線從回溯」

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 

回答

2

好發現的問題,這個問題是不是RSPEC但WEBRAT。 添加到您的Gemfile:

寶石 'webrat', '0.7.1'

RSPEC的版本應該是: 寶石 'rspec的', '2.0.1'

+0

這對我有用。我原來看到這個線程http://stackoverflow.com/questions/3517724/rspec-is-giving-an-error-with-my-layout-links-from-the-rails-tutorial-failure-e這讓我在rspec方向。但這確實是一個網絡問題。 – 2010-11-03 20:43:21

+0

這也適用於我。非常感謝。 – Snackmoore 2010-12-03 08:17:18

0

這並未「T似乎是一個問題,因爲rspec的2.2.0

2

很難認爲這是一個(純)webrat問題...

組:測試, :發展做
寶石 'RSpec的護欄', '2.0.0.beta.18'
寶石 '水豚'
寶石 'database_cleaner'
寶石 '黃瓜軌'
寶石 '黃瓜'
寶石'spork'
gem'launchy'
end

...因爲我使用的是水豚,而不是webrat。

歡迎任何想法。

+0

這裏有同樣的問題。 – 2012-05-08 07:27:24

+0

更新到葡萄實體0.4.0後,我得到了同樣的錯誤。隨着版本0.3.0一切正常。 – 2014-09-14 20:05:39