Я пытаюсь протестировать сбойную ветвь действия обновления на моем контроллере, но у меня возникают проблемы с тестом. Это то, что у меня есть, и оно терпит неудачу на последнем
describe "PUT 'article/:id'" do
.
.
.
describe "with invalid params" do
it "should find the article and return the object" do
Article.stub(:find).with("1").and_return(@article)
end
it "should update the article with new attributes" do
Article.stub(:update_attributes).and_return(false)
end
it "should render the edit form" do
response.should render_template("edit")
end
end
end
Любые идеи относительно того, почему последняя часть не может отобразить шаблон?