Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
049a690e
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,发现更多精彩内容 >>
未验证
提交
049a690e
编写于
10月 05, 2018
作者:
G
Guillermo Iguaran
提交者:
GitHub
10月 05, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #34095 from prathamesh-sonpatki/fix-tests-related-to-ac
Fix tests related to new JavaScript path for generators
上级
0d4b2e4d
2690c41d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
8 deletion
+6
-8
railties/test/generators/app_generator_test.rb
railties/test/generators/app_generator_test.rb
+1
-1
railties/test/generators/channel_generator_test.rb
railties/test/generators/channel_generator_test.rb
+3
-3
railties/test/generators/controller_generator_test.rb
railties/test/generators/controller_generator_test.rb
+0
-2
railties/test/generators/shared_generator_tests.rb
railties/test/generators/shared_generator_tests.rb
+2
-2
未找到文件。
railties/test/generators/app_generator_test.rb
浏览文件 @
049a690e
...
...
@@ -603,7 +603,7 @@ def test_does_not_generate_system_test_files_if_skip_system_test_is_given
def
test_javascript_is_skipped_if_required
run_generator
[
destination_root
,
"--skip-javascript"
]
assert_no_file
"app/
assets/javascripts
"
assert_no_file
"app/
javascript
"
assert_file
"app/views/layouts/application.html.erb"
do
|
contents
|
assert_match
(
/stylesheet_link_tag\s+'application', media: 'all' %>/
,
contents
)
...
...
railties/test/generators/channel_generator_test.rb
浏览文件 @
049a690e
...
...
@@ -57,7 +57,7 @@ def test_channel_asset_is_not_created_when_skip_assets_is_passed
assert_no_file
"app/javascript/channels/chat_channel.js"
end
def
test_c
able
_js_is_created_if_not_present_already
def
test_c
onsumer
_js_is_created_if_not_present_already
run_generator
[
"chat"
]
FileUtils
.
rm
(
"
#{
destination_root
}
/app/javascript/channels/index.js"
)
FileUtils
.
rm
(
"
#{
destination_root
}
/app/javascript/channels/consumer.js"
)
...
...
@@ -72,7 +72,7 @@ def test_channel_on_revoke
run_generator
[
"chat"
],
behavior: :revoke
assert_no_file
"app/channels/chat_channel.rb"
assert_no_file
"app/
assets/javascripts/channels/chat
.js"
assert_no_file
"app/
javascript/channels/chat_channel
.js"
assert_file
"app/channels/application_cable/channel.rb"
assert_file
"app/channels/application_cable/connection.rb"
...
...
@@ -86,7 +86,7 @@ def test_channel_suffix_is_not_duplicated
assert_no_file
"app/channels/chat_channel_channel.rb"
assert_file
"app/channels/chat_channel.rb"
assert_no_file
"app/
assets/javascripts/channels/chat
_channel.js"
assert_no_file
"app/
javascript/channels/chat_channel
_channel.js"
assert_file
"app/javascript/channels/chat_channel.js"
end
end
railties/test/generators/controller_generator_test.rb
浏览文件 @
049a690e
...
...
@@ -130,8 +130,6 @@ def test_controller_suffix_is_not_duplicated
assert_no_file
"app/helpers/account_controller_helper.rb"
assert_file
"app/helpers/account_helper.rb"
assert_no_file
"app/assets/javascripts/account_controller.js"
assert_no_file
"app/assets/stylesheets/account_controller.css"
assert_file
"app/assets/stylesheets/account.css"
end
...
...
railties/test/generators/shared_generator_tests.rb
浏览文件 @
049a690e
...
...
@@ -305,8 +305,8 @@ def test_generator_if_skip_action_cable_is_given
run_generator
[
destination_root
,
"--skip-action-cable"
]
assert_file
"
#{
application_path
}
/config/application.rb"
,
/#\s+require\s+["']action_cable\/engine["']/
assert_no_file
"
#{
application_path
}
/config/cable.yml"
assert_no_file
"
#{
application_path
}
/app/
assets/javascripts/cable
.js"
assert_no_directory
"
#{
application_path
}
/app/
assets/javascripts
/channels"
assert_no_file
"
#{
application_path
}
/app/
javascript/consumer
.js"
assert_no_directory
"
#{
application_path
}
/app/
javascript
/channels"
assert_no_directory
"
#{
application_path
}
/app/channels"
assert_file
"Gemfile"
do
|
content
|
assert_no_match
(
/redis/
,
content
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录