Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
504e5e10
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,发现更多精彩内容 >>
提交
504e5e10
编写于
10月 25, 2015
作者:
C
Claudio B
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #22060 from sebmck/tweak-wording
Tweaked wording used in some tests.
上级
5746638e
a97dcde6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
16 deletion
+16
-16
actionpack/test/dispatch/show_exceptions_test.rb
actionpack/test/dispatch/show_exceptions_test.rb
+2
-2
actionview/test/fixtures/digestor/comments/_comment.html.erb
actionview/test/fixtures/digestor/comments/_comment.html.erb
+1
-1
activerecord/test/cases/associations/inverse_associations_test.rb
...cord/test/cases/associations/inverse_associations_test.rb
+4
-4
activesupport/test/tagged_logging_test.rb
activesupport/test/tagged_logging_test.rb
+6
-6
railties/test/application/middleware/exceptions_test.rb
railties/test/application/middleware/exceptions_test.rb
+3
-3
未找到文件。
actionpack/test/dispatch/show_exceptions_test.rb
浏览文件 @
504e5e10
...
...
@@ -93,13 +93,13 @@ def call(env)
assert_kind_of
AbstractController
::
ActionNotFound
,
env
[
"action_dispatch.exception"
]
assert_equal
"/404"
,
env
[
"PATH_INFO"
]
assert_equal
"/not_found_original_exception"
,
env
[
"action_dispatch.original_path"
]
[
404
,
{
"Content-Type"
=>
"text/plain"
},
[
"YOU FAILED
BRO
"
]]
[
404
,
{
"Content-Type"
=>
"text/plain"
},
[
"YOU FAILED"
]]
end
@app
=
ActionDispatch
::
ShowExceptions
.
new
(
Boomer
.
new
,
exceptions_app
)
get
"/not_found_original_exception"
,
headers:
{
'action_dispatch.show_exceptions'
=>
true
}
assert_response
404
assert_equal
"YOU FAILED
BRO
"
,
body
assert_equal
"YOU FAILED"
,
body
end
test
"returns an empty response if custom exceptions app returns X-Cascade pass"
do
...
...
actionview/test/fixtures/digestor/comments/_comment.html.erb
浏览文件 @
504e5e10
Great story
, bro
!
Great story!
activerecord/test/cases/associations/inverse_associations_test.rb
浏览文件 @
504e5e10
...
...
@@ -83,10 +83,10 @@ def test_has_many_and_belongs_to_automatic_inverse_shares_objects_on_rating
assert_equal
rating
.
comment
,
comment
,
"The Rating's comment should be the original Comment"
rating
.
comment
.
body
=
"
Brogramming is the act of programming, like a bro
."
rating
.
comment
.
body
=
"
Fennec foxes are the smallest of the foxes
."
assert_equal
rating
.
comment
.
body
,
comment
.
body
,
"Changing the Comment's body on the association should change the original Comment's body"
comment
.
body
=
"
Broseiden is the king of the sea of bros
."
comment
.
body
=
"
Kittens are adorable
."
assert_equal
comment
.
body
,
rating
.
comment
.
body
,
"Changing the original Comment's body should change the Comment's body on the association"
end
...
...
@@ -97,10 +97,10 @@ def test_has_many_and_belongs_to_automatic_inverse_shares_objects_on_comment
assert_equal
rating
.
comment
,
comment
,
"The Rating's comment should be the original Comment"
rating
.
comment
.
body
=
"
Brogramming is the act of programming, like a bro
."
rating
.
comment
.
body
=
"
Fennec foxes are the smallest of the foxes
."
assert_equal
rating
.
comment
.
body
,
comment
.
body
,
"Changing the Comment's body on the association should change the original Comment's body"
comment
.
body
=
"
Broseiden is the king of the sea of bros
."
comment
.
body
=
"
Kittens are adorable
."
assert_equal
comment
.
body
,
rating
.
comment
.
body
,
"Changing the original Comment's body should change the Comment's body on the association"
end
...
...
activesupport/test/tagged_logging_test.rb
浏览文件 @
504e5e10
...
...
@@ -72,11 +72,11 @@ def flush(*)
test
"keeps each tag in their own thread"
do
@logger
.
tagged
(
"BCX"
)
do
Thread
.
new
do
@logger
.
tagged
(
"OMG"
)
{
@logger
.
info
"Cool story
bro
"
}
@logger
.
tagged
(
"OMG"
)
{
@logger
.
info
"Cool story"
}
end
.
join
@logger
.
info
"Funky time"
end
assert_equal
"[OMG] Cool story
bro
\n
[BCX] Funky time
\n
"
,
@output
.
string
assert_equal
"[OMG] Cool story
\n
[BCX] Funky time
\n
"
,
@output
.
string
end
test
"keeps each tag in their own instance"
do
...
...
@@ -84,11 +84,11 @@ def flush(*)
@other_logger
=
ActiveSupport
::
TaggedLogging
.
new
(
MyLogger
.
new
(
@other_output
))
@logger
.
tagged
(
"OMG"
)
do
@other_logger
.
tagged
(
"BCX"
)
do
@logger
.
info
"Cool story
bro
"
@logger
.
info
"Cool story"
@other_logger
.
info
"Funky time"
end
end
assert_equal
"[OMG] Cool story
bro
\n
"
,
@output
.
string
assert_equal
"[OMG] Cool story
\n
"
,
@output
.
string
assert_equal
"[BCX] Funky time
\n
"
,
@other_output
.
string
end
...
...
@@ -97,11 +97,11 @@ def flush(*)
Thread
.
new
do
@logger
.
tagged
(
"OMG"
)
do
@logger
.
flush
@logger
.
info
"Cool story
bro
"
@logger
.
info
"Cool story"
end
end
.
join
end
assert_equal
"[FLUSHED]
\n
Cool story
bro
\n
"
,
@output
.
string
assert_equal
"[FLUSHED]
\n
Cool story
\n
"
,
@output
.
string
end
test
"mixed levels of tagging"
do
...
...
railties/test/application/middleware/exceptions_test.rb
浏览文件 @
504e5e10
...
...
@@ -48,7 +48,7 @@ def index
test
"uses custom exceptions app"
do
add_to_config
<<-
RUBY
config.exceptions_app = lambda do |env|
[404, { "Content-Type" => "text/plain" }, ["YOU FAILED
BRO
"]]
[404, { "Content-Type" => "text/plain" }, ["YOU FAILED"]]
end
RUBY
...
...
@@ -56,7 +56,7 @@ def index
get
"/foo"
assert_equal
404
,
last_response
.
status
assert_equal
"YOU FAILED
BRO
"
,
last_response
.
body
assert_equal
"YOU FAILED"
,
last_response
.
body
end
test
"url generation error when action_dispatch.show_exceptions is set raises an exception"
do
...
...
@@ -67,7 +67,7 @@ def index
end
end
RUBY
app
.
config
.
action_dispatch
.
show_exceptions
=
true
get
'/foo'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录