Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
d78e3fe7
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 搜索 >>
提交
d78e3fe7
编写于
3月 02, 2010
作者:
C
Carlhuda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix failing Action Pack tests
上级
9f83cdc3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
4 deletion
+15
-4
actionpack/lib/action_view/test_case.rb
actionpack/lib/action_view/test_case.rb
+1
-1
actionpack/test/abstract_unit.rb
actionpack/test/abstract_unit.rb
+10
-0
actionpack/test/activerecord/controller_runtime_test.rb
actionpack/test/activerecord/controller_runtime_test.rb
+1
-1
actionpack/test/controller/log_subscriber_test.rb
actionpack/test/controller/log_subscriber_test.rb
+2
-1
actionpack/test/template/log_subscriber_test.rb
actionpack/test/template/log_subscriber_test.rb
+1
-1
未找到文件。
actionpack/lib/action_view/test_case.rb
浏览文件 @
d78e3fe7
...
@@ -152,7 +152,7 @@ def _assigns
...
@@ -152,7 +152,7 @@ def _assigns
end
end
def
method_missing
(
selector
,
*
args
)
def
method_missing
(
selector
,
*
args
)
if
ActionDispatch
::
Routing
::
Routes
.
named_routes
.
helpers
.
include?
(
selector
)
if
@controller
.
_router
.
named_routes
.
helpers
.
include?
(
selector
)
@controller
.
__send__
(
selector
,
*
args
)
@controller
.
__send__
(
selector
,
*
args
)
else
else
super
super
...
...
actionpack/test/abstract_unit.rb
浏览文件 @
d78e3fe7
...
@@ -203,6 +203,16 @@ def assert_header(name, value)
...
@@ -203,6 +203,16 @@ def assert_header(name, value)
class
::
ApplicationController
<
ActionController
::
Base
class
::
ApplicationController
<
ActionController
::
Base
end
end
module
ActionView
class
TestCase
# Must repeat the setup because AV::TestCase is a duplication
# of AC::TestCase
setup
do
@router
=
SharedTestRoutes
end
end
end
module
ActionController
module
ActionController
class
Base
class
Base
include
ActionController
::
Testing
include
ActionController
::
Testing
...
...
actionpack/test/activerecord/controller_runtime_test.rb
浏览文件 @
d78e3fe7
...
@@ -17,9 +17,9 @@ def show
...
@@ -17,9 +17,9 @@ def show
tests
LogSubscriberController
tests
LogSubscriberController
def
setup
def
setup
super
@old_logger
=
ActionController
::
Base
.
logger
@old_logger
=
ActionController
::
Base
.
logger
Rails
::
LogSubscriber
.
add
(
:action_controller
,
ActionController
::
Railties
::
LogSubscriber
.
new
)
Rails
::
LogSubscriber
.
add
(
:action_controller
,
ActionController
::
Railties
::
LogSubscriber
.
new
)
super
end
end
def
teardown
def
teardown
...
...
actionpack/test/controller/log_subscriber_test.rb
浏览文件 @
d78e3fe7
...
@@ -40,6 +40,8 @@ class ACLogSubscriberTest < ActionController::TestCase
...
@@ -40,6 +40,8 @@ class ACLogSubscriberTest < ActionController::TestCase
include
Rails
::
LogSubscriber
::
TestHelper
include
Rails
::
LogSubscriber
::
TestHelper
def
setup
def
setup
super
@old_logger
=
ActionController
::
Base
.
logger
@old_logger
=
ActionController
::
Base
.
logger
@cache_path
=
File
.
expand_path
(
'../temp/test_cache'
,
File
.
dirname
(
__FILE__
))
@cache_path
=
File
.
expand_path
(
'../temp/test_cache'
,
File
.
dirname
(
__FILE__
))
...
@@ -47,7 +49,6 @@ def setup
...
@@ -47,7 +49,6 @@ def setup
ActionController
::
Base
.
cache_store
=
:file_store
,
@cache_path
ActionController
::
Base
.
cache_store
=
:file_store
,
@cache_path
Rails
::
LogSubscriber
.
add
(
:action_controller
,
ActionController
::
Railties
::
LogSubscriber
.
new
)
Rails
::
LogSubscriber
.
add
(
:action_controller
,
ActionController
::
Railties
::
LogSubscriber
.
new
)
super
end
end
def
teardown
def
teardown
...
...
actionpack/test/template/log_subscriber_test.rb
浏览文件 @
d78e3fe7
...
@@ -7,11 +7,11 @@ class AVLogSubscriberTest < ActiveSupport::TestCase
...
@@ -7,11 +7,11 @@ class AVLogSubscriberTest < ActiveSupport::TestCase
include
Rails
::
LogSubscriber
::
TestHelper
include
Rails
::
LogSubscriber
::
TestHelper
def
setup
def
setup
super
@old_logger
=
ActionController
::
Base
.
logger
@old_logger
=
ActionController
::
Base
.
logger
@view
=
ActionView
::
Base
.
new
(
ActionController
::
Base
.
view_paths
,
{})
@view
=
ActionView
::
Base
.
new
(
ActionController
::
Base
.
view_paths
,
{})
Rails
.
stubs
(
:root
).
returns
(
File
.
expand_path
(
FIXTURE_LOAD_PATH
))
Rails
.
stubs
(
:root
).
returns
(
File
.
expand_path
(
FIXTURE_LOAD_PATH
))
Rails
::
LogSubscriber
.
add
(
:action_view
,
ActionView
::
Railties
::
LogSubscriber
.
new
)
Rails
::
LogSubscriber
.
add
(
:action_view
,
ActionView
::
Railties
::
LogSubscriber
.
new
)
super
end
end
def
teardown
def
teardown
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录