2012-05-29 3 views
3

우분투 12.04를 실행하는 내 컴퓨터의 레일 v3.2.3 프로젝트에 테스트를 작성하기 위해 autotest-notification v2.3.4 및 rspec v2.0.1을 사용합니다. 내 pages_controller_spec.rb에서 코드RSpec 및 Autotest 레일 3 프로젝트에서 발생

require 'spec_helper' 

describe PagesController do 

    describe "GET 'contact'" do 
    it "should be successful" do 
     get 'contact' 
     response.should be_success 
    end 
    end 

end 

나는 다음과 같은 오류이 오류의 원인이되며, 내가 그것을 어떻게 해결할 수 무엇

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instanc\ 
e methods directly in RSpec::Rails::SetupAndTeardownAdapter instead. (called from <top (required)> at /home/kris/development/rails_projects/s\ 
ample_app/spec/controllers/pages_controller_spec.rb:3) 
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instanc\ 
e methods directly in RSpec::Rails::TestUnitAssertionAdapter instead. (called from <top (required)> at /home/kris/development/rails_projects/\ 
sample_app/spec/controllers/pages_controller_spec.rb:3) 
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instanc\ 
e methods directly in RSpec::Rails::ViewRendering instead. (called from <top (required)> at /home/kris/development/rails_projects/sample_app/\ 
spec/controllers/pages_controller_spec.rb:3) 
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instanc\ 
e methods directly in RSpec::Rails::ControllerExampleGroup instead. (called from <top (required)> at /home/kris/development/rails_projects/sa\ 
mple_app/spec/controllers/pages_controller_spec.rb:3) 

Failures: 
    1) PagesController GET 'contact' should be successful 
    Failure/Error: Unable to find matching line from backtrace 
    undefined method `run_all' for []:Array 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/hooks.rb:116:in `run_hook_filtered' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/example_group.rb:174:in `eval_before_alls' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/example_group.rb:229:in `run' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `block (2 levels) in run' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `map' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `block in run' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/reporter.rb:11:in `report' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:23:in `run' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:55:in `run_in_process' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:46:in `run' 
    # /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:10:in `block in autorun' 

Finished in 0.00028 seconds 
1 example, 1 failure 
/home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/hooks.rb:116:in `run_hook_filtered': undefined method `run_all' for\ 
[]:Array (NoMethodError) 
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/example_group.rb:213:in `eval_after_alls' 
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/example_group.rb:236:in `run' 
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `block (2 levels) in run' 
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `map' 
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `block in run' 

을 받고 명령 rspec spec/ 메신저 실행?

도와주세요 감사합니다.

+0

RSpec을 업데이트 할 수 있습니까? 이것은 : http://www.ruby-forum.com/topic/788351 (그리고 연결된 github 문제)는 이전 버전의 RSpec과 Ruby 1.9.3에 문제가 있음을 암시합니다. –

+2

정말 고마워요! 마침내 내 Gemfile에서 2.0.1을 2.4.0으로 변경하고'bundle update rspec' 명령을 실행하여 문제를 해결했습니다 :) – Kris

+0

아무런 문제없이 도움이 되셨습니다! 나는 그것을 대답으로 표시 할 것이다. :) –

답변

10

RSpec을 업데이트 해보십시오. 이것은 : ruby-forum.com/topic/788351 (그리고 연결된 github 문제)는 RSpec의 이전 버전과 Ruby 1.9.3에 문제가 있음을 시사합니다.

관련 문제