샘플 RoR 앱에서 작업 중이며 rspec으로 테스트하는 데 문제가 있습니다. 나는 rspec을 설치하고 테스트를 실행하지만 실패하고 있으며 이유를 모르겠습니다. 명령을 실행합니다 :"NameError : 초기화되지 않은 상수 ActionController :: TestCase :: Assertions"로 Rspec 테스트가 실패합니다.
bundle exec rspec spec/
그리고 이것을 실행할 때; 이것은 내가받는 오류 메시지입니다 :
Failures:
1) PagesController GET 'home' should be successful
Failure/Error: Unable to find matching line from backtrace
NameError:
uninitialized constant ActionController::TestCase::Assertions
# /usr/lib/ruby/vendor_ruby/action_controller/integration.rb:18
# /usr/lib/ruby/gems/1.8/gems/webrat-0.7.1/lib/webrat/integrations/rails.rb:2
# /usr/lib/ruby/gems/1.8/gems/webrat-0.7.1/lib/webrat/core/configuration.rb:105:in `mode='
# /usr/lib/ruby/gems/1.8/gems/rspec-rails-2.6.1/lib/rspec/rails/vendor/webrat.rb:26
# /usr/lib/ruby/gems/1.8/gems/webrat-
그리고 더 많은 오류 메시지가 있습니다.
저는 RoR에 대한 전문가가 아니기 때문에 도움에 정말로 감사 할 것입니다. 미리 감사드립니다.
'Gemfile'에는 어떤 버전의 webrat와 Rspec가 있습니다. 또한'보석 목록'이 당신에게 사용하고 있다고 말하는 것은 무엇입니까? –
보석 'RSpec에 레일', '2.6.1' 보석 'webrat', '0.7.1' – Hugs
RSpec에 (2.6.0) RSpec에 코어 (2.6.4) - RSpec에 기대 (2.6.0) rspec-mocks (2.6.0) rspec-rails (2.6.1) webrat (0.7.1) 이것은 보석 목록 출력에서 나온 것입니다. – Hugs