开发者

Request format in functional tests

开发者 https://www.devze.com 2023-02-22 04:39 出处:网络
How do I set the request format in a functional test? I\'m trying to do something like:开发者_C百科

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

精彩评论

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