Come si registra su un controller diverso da quello in cui lo script di test sta attualmente puntando?post su un controller diverso in un test rspec
Esempio: in user_controller_spec.rb
it "should just post to users" do
post :create, @params # this goes to the users controller
end
voglio fare qualcosa di simile:
it "should post to user and people to do some integration testing" do
post :create, @params # this goes to the users controller still
post 'people', :create, @params # this goes to the people controller
end
ps: io non voglio configurare il cetriolo
fantastico! funziona molto bene per me. – Tilo
Volevo controllare su quale controller è andato a colpire, questo ha aiutato un po '. –