2010-04-28 3 views
0

방금 ​​Rspec 및 Rspec 레일을 설치했습니다. 내가 테스트를 실행하려고하면, 그것은 말한다 : 여기Rails + RSpec 문제

rake aborted! 
Command /opt/local/bin/ruby -I"lib" "/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec" "spec/controllers/free_controller_spec.rb" --options "/Volumes/Trash/dev/app/trunk/spec/spec.opts" failed 

전체 로그 : http://pastie.org/939211

그러나, SQLite는 내 두 번째 "테스트"응용 프로그램이 작동합니다. 내 DB에 문제가 있다고 생각합니다.

내 루비 버전은 1.8.7이고 데이터베이스로 mysql을 사용합니다.

내 파일 :

specs/spec_helper.rb

config/environment.rb

config/environments/test.rb

List of my gems

내 시험은 그냥 :

require 'spec_helper' 

describe FreeController do 

    it "should respond with success" do 
     get 'index' 
     response.should be_success 
    end 

end 

정말 오류를 이해할 수없는, 그래서 그것을 해결하는 방법을 모른다 ..

추가 질문 : 테스트 데이터를 만들기위한 기계공을 사용하려고하면 내가하는 비품 및 액티브를 사용한다 ? 그들을 비활성화하려면 어떻게해야합니까? 귀하의 오류 로그에서

답변

1

:

/app/models/thread.rb:1: superclass mismatch for class Thread (TypeError) 

모델은 Thread라는? 이름 충돌이있을 수 있습니다. Ruby에는 Thread이라는 내장 클래스가 있습니다. 모델의 이름을 변경하십시오.

+0

예, 그렇습니다! 나는 사용하지 않았지만 그것을 파괴하는 것을 잊었다. 감사) – FancyDancy

관련 문제