Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
7814f901
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7814f901
编写于
1月 29, 2015
作者:
R
Rafael Mendonça França
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use fixed fonts only in the name of the parameter
上级
0eb3ba0e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
14 deletion
+14
-14
actionpack/lib/action_controller/test_case.rb
actionpack/lib/action_controller/test_case.rb
+8
-8
actionpack/lib/action_dispatch/testing/integration.rb
actionpack/lib/action_dispatch/testing/integration.rb
+3
-3
guides/source/testing.md
guides/source/testing.md
+3
-3
未找到文件。
actionpack/lib/action_controller/test_case.rb
浏览文件 @
7814f901
...
@@ -494,11 +494,11 @@ def determine_default_controller_class(name)
...
@@ -494,11 +494,11 @@ def determine_default_controller_class(name)
# Simulate a GET request with the given parameters.
# Simulate a GET request with the given parameters.
#
#
# - +action+: The controller action to call.
# - +action+: The controller action to call.
# - +params
:+
The hash with HTTP parameters that you want to pass. This may be +nil+.
# - +params
+:
The hash with HTTP parameters that you want to pass. This may be +nil+.
# - +body
:+
The request body with a string that is appropriately encoded
# - +body
+:
The request body with a string that is appropriately encoded
# (<tt>application/x-www-form-urlencoded</tt> or <tt>multipart/form-data</tt>).
# (<tt>application/x-www-form-urlencoded</tt> or <tt>multipart/form-data</tt>).
# - +session
:+
A hash of parameters to store in the session. This may be +nil+.
# - +session
+:
A hash of parameters to store in the session. This may be +nil+.
# - +flash
:+
A hash of parameters to store in the flash. This may be +nil+.
# - +flash
+:
A hash of parameters to store in the flash. This may be +nil+.
#
#
# You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with
# You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with
# +post+, +patch+, +put+, +delete+, and +head+.
# +post+, +patch+, +put+, +delete+, and +head+.
...
@@ -574,11 +574,11 @@ def paramify_values(hash_or_array_or_value)
...
@@ -574,11 +574,11 @@ def paramify_values(hash_or_array_or_value)
# - +action+: The controller action to call.
# - +action+: The controller action to call.
# - +method+: Request method used to send the HTTP request. Possible values
# - +method+: Request method used to send the HTTP request. Possible values
# are +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, +HEAD+. Defaults to +GET+. Can be a symbol.
# are +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, +HEAD+. Defaults to +GET+. Can be a symbol.
# - +params
:+
The hash with HTTP parameters that you want to pass. This may be +nil+.
# - +params
+:
The hash with HTTP parameters that you want to pass. This may be +nil+.
# - +body
:+
The request body with a string that is appropriately encoded
# - +body
+:
The request body with a string that is appropriately encoded
# (<tt>application/x-www-form-urlencoded</tt> or <tt>multipart/form-data</tt>).
# (<tt>application/x-www-form-urlencoded</tt> or <tt>multipart/form-data</tt>).
# - +session
:+
A hash of parameters to store in the session. This may be +nil+.
# - +session
+:
A hash of parameters to store in the session. This may be +nil+.
# - +flash
:+
A hash of parameters to store in the flash. This may be +nil+.
# - +flash
+:
A hash of parameters to store in the flash. This may be +nil+.
#
#
# Example calling +create+ action and sending two params:
# Example calling +create+ action and sending two params:
#
#
...
...
actionpack/lib/action_dispatch/testing/integration.rb
浏览文件 @
7814f901
...
@@ -12,14 +12,14 @@ module RequestHelpers
...
@@ -12,14 +12,14 @@ module RequestHelpers
#
#
# - +path+: The URI (as a String) on which you want to perform a GET
# - +path+: The URI (as a String) on which you want to perform a GET
# request.
# request.
# - +params
:+
The HTTP parameters that you want to pass. This may
# - +params
+:
The HTTP parameters that you want to pass. This may
# be +nil+,
# be +nil+,
# a Hash, or a String that is appropriately encoded
# a Hash, or a String that is appropriately encoded
# (<tt>application/x-www-form-urlencoded</tt> or
# (<tt>application/x-www-form-urlencoded</tt> or
# <tt>multipart/form-data</tt>).
# <tt>multipart/form-data</tt>).
# - +headers
:+
Additional headers to pass, as a Hash. The headers will be
# - +headers
+:
Additional headers to pass, as a Hash. The headers will be
# merged into the Rack env hash.
# merged into the Rack env hash.
# - +env
:+
Additional env to pass, as a Hash. The headers will be
# - +env
+:
Additional env to pass, as a Hash. The headers will be
# merged into the Rack env hash.
# merged into the Rack env hash.
#
#
# This method returns a Response object, which one can use to
# This method returns a Response object, which one can use to
...
...
guides/source/testing.md
浏览文件 @
7814f901
...
@@ -483,12 +483,12 @@ The `get` method kicks off the web request and populates the results into the re
...
@@ -483,12 +483,12 @@ The `get` method kicks off the web request and populates the results into the re
*
The action of the controller you are requesting.
*
The action of the controller you are requesting.
This can be in the form of a string or a symbol.
This can be in the form of a string or a symbol.
*
`params
:`
option with a hash of request parameters to pass into the action
*
`params
`
:
option with a hash of request parameters to pass into the action
(e.g. query string parameters or article variables).
(e.g. query string parameters or article variables).
*
`session
:`
option with a hash of session variables to pass along with the request.
*
`session
`
:
option with a hash of session variables to pass along with the request.
*
`flash
:`
option with a hash of flash values.
*
`flash
`
:
option with a hash of flash values.
All the keyword arguments are optional.
All the keyword arguments are optional.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录