如何發佈到與測試腳本當前指向的控制器不同的控制器?在rspec測試中發佈到不同的控制器
例: 在user_controller_spec.rb
it "should just post to users" do
post :create, @params # this goes to the users controller
end
我想要做的事,如:
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:我不想安裝黃瓜
太棒了!對我來說效果很好。 – Tilo
我想檢查一下它打哪個控制器,這有點幫助。 –