【发布时间】:2014-04-06 09:53:52
【问题描述】:
如何告诉 RSpec/Capybara 期待 RoutingError?原因是我希望用户通过 PUT 而不是通过 GET/访问路径单击链接以“认领车牌”。
基本上我想expect ActionController::RoutingError: No route matches [GET] "/plates/claim/1"。
scenario 'they have to click the claim link' do
create_plates
sign_in_as_doctor
visit claim_plate_path(@plates.first.id)
?????
end
【问题讨论】:
标签: ruby-on-rails rspec capybara