Micheal Hartl의 Ruby on Rails 튜토리얼 2.3 버전을 따르며 통합 테스트를위한 단계를 올바르게 수행했습니다. in /sample_app/spec/integrationlayout_links_spec.rb이라는 파일이 있습니다.RSpec 통합 테스트를 실행할 때 NoMethodError 정의되지 않은 메소드 'merge'
require 'spec_helper'
describe "Layout links" do
it "should have a Home page at '/'" do
get '/'
response.should render_template('pages/home')
end
end
나는 다음과 같은 오류를 얻고있다
$ spec spec/
을 수행 할 때
1)
NoMethodError in 'Layout links should have a Home page at '/''
undefined method `merge' for nil:NilClass
/home/rails_projects/sample_app/spec/integration/layout_links_spec.rb:4:
Finished in 0.060225 seconds
1 example, 1 failure
이 오류이 질문을 바탕으로
'rspec spec --backtrace'를 사용하여 스펙을 실행하십시오. 그러면 전체 백 트레이스가 인쇄되어 더 많은 정보를 얻을 수 있습니다. –