Bir eylem kodu vardır: Bu tarayıcıda çalışıyorNasıl render test edilir: Rspec 2 dosyasında dosya => 'public/404.html'?
render :file => 'public/404.html' and return
.
it "renders 404" do
get :new
response.should render_template('public/404.html')
end
şu hatayla bu örnek sonuçlarını Koşu: Bunu test etmek için aşağıdaki RSpec örnek yazdım
Failure/Error: response.should render_template('public/404.html')
Expected block to return true value.
Ben de bir hata response.should render_template(:file => 'public/404.html')
ama bu da sonuç çalıştık.
Bunu nasıl test etmeliyim?
Bu işe yaramıyor: render_template (: dosya => "sahte dosya") geçer. – therin
Benim için çalışır RSpec 3.2, Raylar 4.2 – fny