Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 Sinatra 应用程序中测试如下所示的路线。
post '/xxx' do @yyy.update do |doc| ... ... ... end redirect '/zzz' end
我的问题是:如何从我的测试中创建变量@yyy(在这种情况下是一个类)和方法“更新”?