【发布时间】:2012-11-01 21:12:44
【问题描述】:
我想测试我的编辑配方页面是否使用 rspec 呈现,尽管它不会路由到
recipes/edit
它路由到 recipes/id/edit(id 被替换为数字)
我目前的测试是这样的
describe "Show Edit Recipe Page" do
it "should display edit recipe page" do
get :edit
response.should be_success
response.should render_template(:edit)
end
end
目前我的测试失败了,如何正确测试此页面
【问题讨论】:
标签: ruby-on-rails-3 rspec controller