Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
7b3b7cb2
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,体验更适合开发者的 AI 搜索 >>
提交
7b3b7cb2
编写于
4月 30, 2009
作者:
J
Joshua Peek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move generic assertions into ActionDispatch
上级
98dd7266
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
19 addition
and
14 deletion
+19
-14
actionpack/lib/action_controller/testing/integration.rb
actionpack/lib/action_controller/testing/integration.rb
+1
-1
actionpack/lib/action_controller/testing/test_case.rb
actionpack/lib/action_controller/testing/test_case.rb
+1
-6
actionpack/lib/action_dispatch.rb
actionpack/lib/action_dispatch.rb
+2
-0
actionpack/lib/action_dispatch/testing/assertions.rb
actionpack/lib/action_dispatch/testing/assertions.rb
+8
-0
actionpack/lib/action_dispatch/testing/assertions/dom.rb
actionpack/lib/action_dispatch/testing/assertions/dom.rb
+1
-1
actionpack/lib/action_dispatch/testing/assertions/model.rb
actionpack/lib/action_dispatch/testing/assertions/model.rb
+1
-1
actionpack/lib/action_dispatch/testing/assertions/response.rb
...onpack/lib/action_dispatch/testing/assertions/response.rb
+1
-1
actionpack/lib/action_dispatch/testing/assertions/routing.rb
actionpack/lib/action_dispatch/testing/assertions/routing.rb
+1
-1
actionpack/lib/action_dispatch/testing/assertions/selector.rb
...onpack/lib/action_dispatch/testing/assertions/selector.rb
+1
-1
actionpack/lib/action_dispatch/testing/assertions/tag.rb
actionpack/lib/action_dispatch/testing/assertions/tag.rb
+1
-1
actionpack/lib/action_view/test_case.rb
actionpack/lib/action_view/test_case.rb
+1
-1
未找到文件。
actionpack/lib/action_controller/testing/integration.rb
浏览文件 @
7b3b7cb2
...
...
@@ -14,7 +14,7 @@ module Integration #:nodoc:
# Integration::Session directly.
class
Session
include
Test
::
Unit
::
Assertions
include
Action
Controller
::
TestCase
::
Assertions
include
Action
Dispatch
::
Assertions
include
ActionController
::
TestProcess
# The integer HTTP status code of the last request.
...
...
actionpack/lib/action_controller/testing/test_case.rb
浏览文件 @
7b3b7cb2
...
...
@@ -105,12 +105,7 @@ module ActionController
class
TestCase
<
ActiveSupport
::
TestCase
include
TestProcess
module
Assertions
%w(response selector tag dom routing model)
.
each
do
|
kind
|
include
ActionController
::
Assertions
.
const_get
(
"
#{
kind
.
camelize
}
Assertions"
)
end
end
include
Assertions
include
ActionDispatch
::
Assertions
# When the request.remote_addr remains the default for testing, which is 0.0.0.0, the exception is simply raised inline
# (bystepping the regular exception handling from rescue_action). If the request.remote_addr is anything else, the regular
...
...
actionpack/lib/action_dispatch.rb
浏览文件 @
7b3b7cb2
...
...
@@ -45,6 +45,8 @@ module ActionDispatch
autoload
:Reloader
,
'action_dispatch/middleware/reloader'
autoload
:MiddlewareStack
,
'action_dispatch/middleware/stack'
autoload
:Assertions
,
'action_dispatch/testing/assertions'
module
Http
autoload
:Headers
,
'action_dispatch/http/headers'
end
...
...
actionpack/lib/action_dispatch/testing/assertions.rb
0 → 100644
浏览文件 @
7b3b7cb2
module
ActionDispatch
module
Assertions
%w(response selector tag dom routing model)
.
each
do
|
kind
|
require
"action_dispatch/testing/assertions/
#{
kind
}
"
include
const_get
(
"
#{
kind
.
camelize
}
Assertions"
)
end
end
end
actionpack/lib/action_
controller
/testing/assertions/dom.rb
→
actionpack/lib/action_
dispatch
/testing/assertions/dom.rb
浏览文件 @
7b3b7cb2
module
Action
Controller
module
Action
Dispatch
module
Assertions
module
DomAssertions
# Test two HTML strings for equivalency (e.g., identical up to reordering of attributes)
...
...
actionpack/lib/action_
controller
/testing/assertions/model.rb
→
actionpack/lib/action_
dispatch
/testing/assertions/model.rb
浏览文件 @
7b3b7cb2
module
Action
Controller
module
Action
Dispatch
module
Assertions
module
ModelAssertions
# Ensures that the passed record is valid by Active Record standards and
...
...
actionpack/lib/action_
controller
/testing/assertions/response.rb
→
actionpack/lib/action_
dispatch
/testing/assertions/response.rb
浏览文件 @
7b3b7cb2
module
Action
Controller
module
Action
Dispatch
module
Assertions
# A small suite of assertions that test responses from Rails applications.
module
ResponseAssertions
...
...
actionpack/lib/action_
controller
/testing/assertions/routing.rb
→
actionpack/lib/action_
dispatch
/testing/assertions/routing.rb
浏览文件 @
7b3b7cb2
module
Action
Controller
module
Action
Dispatch
module
Assertions
# Suite of assertions to test routes generated by Rails and the handling of requests made to them.
module
RoutingAssertions
...
...
actionpack/lib/action_
controller
/testing/assertions/selector.rb
→
actionpack/lib/action_
dispatch
/testing/assertions/selector.rb
浏览文件 @
7b3b7cb2
...
...
@@ -3,7 +3,7 @@
# Under MIT and/or CC By license.
#++
module
Action
Controller
module
Action
Dispatch
module
Assertions
unless
const_defined?
(
:NO_STRIP
)
NO_STRIP
=
%w{pre script style textarea}
...
...
actionpack/lib/action_
controller
/testing/assertions/tag.rb
→
actionpack/lib/action_
dispatch
/testing/assertions/tag.rb
浏览文件 @
7b3b7cb2
module
Action
Controller
module
Action
Dispatch
module
Assertions
# Pair of assertions to testing elements in the HTML output of the response.
module
TagAssertions
...
...
actionpack/lib/action_view/test_case.rb
浏览文件 @
7b3b7cb2
...
...
@@ -21,7 +21,7 @@ def _render_template(template, local_assigns = {})
end
class
TestCase
<
ActiveSupport
::
TestCase
include
Action
Controller
::
TestCase
::
Assertions
include
Action
Dispatch
::
Assertions
include
ActionController
::
TestProcess
class_inheritable_accessor
:helper_class
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录