0
購物車有幾個購物車項目。測試渲染模板指定次數
如何測試是否爲每件商品呈現「cart_item」模板,並在購物車中展示?
換句話說,如何測試,模板是否呈現指定的次數?
我需要的是這樣的:
it "renders cart_items" do
render
rendered.should render_template("checkout/cart/_cart_item", :times => cart.cart_items.count)
end