开发者

Request format in functional tests

How do I set the request format in a functional test?

I'm trying to do something like:

开发者_C百科

get :show, :id => '1', :format => :xml

but that doesn't work.


For some reason you can't use symbols to define the format in tests, you must use the string version.

get :show, :id => '1', :format => 'xml'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜