【发布时间】:2011-09-02 23:06:36
【问题描述】:
如何发布到与测试脚本当前指向的控制器不同的控制器?
示例: 在 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:我不想设置黄瓜
【问题讨论】:
标签: ruby-on-rails rspec