...RSpec에 테스트 내가 RSpec에에이 테스트를 실행하는거야
it 'get email is successful' do
get :email
response.should be_success
response.should render_template('email')
끝 컨트롤러 코드는 다음과 같습니다
실패 ..
def email
respond_to do |format|
format.js
end
end
내 터미널에서 나는 다시 돌아올거야 ....
3) PostsController checking to see if response for post email is successful
Failure/Error: response.should be_success
expected success? to return true, got false
# ./spec/controllers/posts_controller_spec.rb:116:in `block (3 levels) in <top
(required)>'
테스트를 수행하기 위해 여기에 무엇을 놓치고 있습니까? 그것은 명백한 것이어야합니다. 내보기 파일의 제목은 email.js.erb
입니다. 이 동작은 AJAX 호출을위한 것입니다.
감사합니다. 그것은 작동합니다. – jason328