I ran into a problem with rspec and controllers
I describe the update action, so for this I call the following code:
put :update, :id => "1", :ntp => {:name=>'myservah'}
My controller has the following code:
def update
if @ntp.update_attributes(params[:ntp])
flash.now[:notice] = "Successfully updated ntp."
else
flash.now[:error] = ((errors_to_a(@ntp)*'.<br />')+'.')
end
render :partial => 'update'
end
And I get the following error:
Error / Error: put: update ,: id => "1",: ntp => {: name => 'myservah'} There is no partial ntps / update using {: handlers => [: erb ,: rjs ,: builder ,: rhtml ,: rxml],: formats => [: html],: locale => [: en ,: en]} to see the path "#"
My question is: should I say which handler I have? Today my part is called "_update.js.erb".
BTW, my code works, I display the version of the update "js", since I just run some scripts