Controllerget
メソッドなどを使い、
アクションのメソッドを指定します。
1 get :index
しかし、config/rou
の中でmap.root :formulae
のようにルートのPathをindex
アクションにマッピングしている場合でも、
get :index
を呼び出した結果、Controllerrequest.re
の値は正しいルートのPathになっていません。
そのような場合には、以下のようにすると正しい結果が得られます。
1 request.set_REQUEST_URI '/' 2 get :index
posted by
genki
on Sat 26 Jul 2008
at 00:41