Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
4a56f8f3
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,发现更多精彩内容 >>
提交
4a56f8f3
编写于
8月 27, 2010
作者:
J
Joost Baaij
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
escape constants that should not be linked to
上级
76c56934
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
11 deletion
+11
-11
actionpack/lib/action_dispatch/http/mime_negotiation.rb
actionpack/lib/action_dispatch/http/mime_negotiation.rb
+1
-1
actionpack/lib/action_dispatch/http/url.rb
actionpack/lib/action_dispatch/http/url.rb
+2
-2
actionpack/lib/action_dispatch/testing/assertions/dom.rb
actionpack/lib/action_dispatch/testing/assertions/dom.rb
+1
-1
actionpack/lib/action_dispatch/testing/assertions/response.rb
...onpack/lib/action_dispatch/testing/assertions/response.rb
+5
-5
actionpack/lib/action_dispatch/testing/assertions/routing.rb
actionpack/lib/action_dispatch/testing/assertions/routing.rb
+2
-2
未找到文件。
actionpack/lib/action_dispatch/http/mime_negotiation.rb
浏览文件 @
4a56f8f3
...
...
@@ -32,7 +32,7 @@ def accepts
end
end
# Returns the M
ime
type for the \format used in the request.
# Returns the M
IME
type for the \format used in the request.
#
# GET /posts/5.xml | request.format => Mime::XML
# GET /posts/5.xhtml | request.format => Mime::HTML
...
...
actionpack/lib/action_dispatch/http/url.rb
浏览文件 @
4a56f8f3
module
ActionDispatch
module
Http
module
URL
# Returns the complete URL used for this request.
# Returns the complete
\
URL used for this request.
def
url
protocol
+
host_with_port
+
fullpath
end
...
...
@@ -96,7 +96,7 @@ def subdomain(tld_length = 1)
end
# Returns the request URI, accounting for server idiosyncrasies.
# WEBrick includes the full URL. IIS leaves REQUEST_URI blank.
# WEBrick includes the full
\
URL. IIS leaves REQUEST_URI blank.
def
request_uri
ActiveSupport
::
Deprecation
.
warn
"Using #request_uri is deprecated. Use fullpath instead."
,
caller
fullpath
...
...
actionpack/lib/action_dispatch/testing/assertions/dom.rb
浏览文件 @
4a56f8f3
...
...
@@ -3,7 +3,7 @@
module
ActionDispatch
module
Assertions
module
DomAssertions
# Test two HTML strings for equivalency (e.g., identical up to reordering of attributes)
#
\
Test two HTML strings for equivalency (e.g., identical up to reordering of attributes)
#
# ==== Examples
#
...
...
actionpack/lib/action_dispatch/testing/assertions/response.rb
浏览文件 @
4a56f8f3
module
ActionDispatch
module
Assertions
# A small suite of assertions that test responses from Rails applications.
# A small suite of assertions that test responses from
\
Rails applications.
module
ResponseAssertions
extend
ActiveSupport
::
Concern
...
...
@@ -18,8 +18,8 @@ module ResponseAssertions
# * <tt>:missing</tt> - Status code was 404
# * <tt>:error</tt> - Status code was in the 500-599 range
#
# You can also pass an explicit status number like
assert_response(501)
# or its symbolic equivalent
assert_response(:not_implemented)
.
# You can also pass an explicit status number like
<tt>assert_response(501)</tt>
# or its symbolic equivalent
<tt>assert_response(:not_implemented)</tt>
.
# See ActionDispatch::StatusCodes for a full list.
#
# ==== Examples
...
...
@@ -45,8 +45,8 @@ def assert_response(type, message = nil)
end
# Assert that the redirection options passed in match those of the redirect called in the latest action.
# This match can be partial, such that
assert_redirected_to(:controller => "weblog")
will also
# match the redirection of
redirect_to(:controller => "weblog", :action => "show")
and so on.
# This match can be partial, such that
<tt>assert_redirected_to(:controller => "weblog")</tt>
will also
# match the redirection of
<tt>redirect_to(:controller => "weblog", :action => "show")</tt>
and so on.
#
# ==== Examples
#
...
...
actionpack/lib/action_dispatch/testing/assertions/routing.rb
浏览文件 @
4a56f8f3
...
...
@@ -4,10 +4,10 @@
module
ActionDispatch
module
Assertions
# Suite of assertions to test routes generated by Rails and the handling of requests made to them.
# Suite of assertions to test routes generated by
\
Rails and the handling of requests made to them.
module
RoutingAssertions
# Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash)
# match +path+. Basically, it asserts that Rails recognizes the route given by +expected_options+.
# match +path+. Basically, it asserts that
\
Rails recognizes the route given by +expected_options+.
#
# Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes
# requiring a specific HTTP method. The hash should contain a :path with the incoming request path
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录