it "should submit form", :driver => :webkit do
visit '/things/new'
page.should have_content('Login')
fill_in 'user_login', with: @thing.email
fill_in 'user_comment', with: @thing.comment
click_button 'log_in'
save_and_open_page
page.should have_content('Thanks!')
end
浏览器中的响应[内部服务器错误]:
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
我猜 things_controller 或 things/_form 中的某些东西出乎意料地为零,但我似乎无法确定它是什么。该页面在开发中运行良好(使用填充的数据库)
有没有办法获得更有意义的反馈?
还是我走错了路?