Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
ab2f2b22
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 搜索 >>
提交
ab2f2b22
编写于
10月 08, 2010
作者:
D
David Calavera
提交者:
Xavier Noria
10月 10, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
prevent rake test to run the test suite three times when ENV['TEST'] is set [#3572 state:resolved]
Signed-off-by:
N
Xavier Noria
<
fxn@hashref.com
>
上级
b3cadf33
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
6 deletion
+14
-6
actionpack/RUNNING_UNIT_TESTS
actionpack/RUNNING_UNIT_TESTS
+8
-5
railties/lib/rails/test_unit/testing.rake
railties/lib/rails/test_unit/testing.rake
+6
-1
未找到文件。
actionpack/RUNNING_UNIT_TESTS
浏览文件 @
ab2f2b22
...
...
@@ -8,15 +8,18 @@ Rake can be found at http://rake.rubyforge.org
== Running by hand
If you only want to run a single test suite, or don't want to bother with Rake,
you can do so with something like:
To run a single test suite
r
uby -Itest test/controller/base_tests
.rb
r
ake test TEST=path/to/test
.rb
== Dependency on ActiveRecord and database setup
which can be further narrowed down to one test:
rake test TEST=path/to/test.rb TESTOPTS="--name=test_something"
== Dependency on Active Record and database setup
Test cases in the test/controller/active_record/ directory depend on having
activerecord and sqlite installed. If ActiveRecord is not in
activerecord and sqlite installed. If Active
Record is not in
actionpack/../activerecord directory, or the sqlite rubygem is not installed,
these tests are skipped.
...
...
railties/lib/rails/test_unit/testing.rake
浏览文件 @
ab2f2b22
...
...
@@ -73,7 +73,8 @@ end
desc
'Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)'
task
:test
do
errors
=
%w(test:units test:functionals test:integration)
.
collect
do
|
task
|
tests_to_run
=
ENV
[
'TEST'
]
?
[
"test:single"
]
:
%w(test:units test:functionals test:integration)
errors
=
tests_to_run
.
collect
do
|
task
|
begin
Rake
::
Task
[
task
].
invoke
nil
...
...
@@ -123,6 +124,10 @@ namespace :test do
end
Rake
::
Task
[
'test:uncommitted'
].
comment
=
"Test changes since last checkin (only Subversion and Git)"
Rake
::
TestTask
.
new
(
:single
=>
"test:prepare"
)
do
|
t
|
t
.
libs
<<
"test"
end
TestTaskWithoutDescription
.
new
(
:units
=>
"test:prepare"
)
do
|
t
|
t
.
libs
<<
"test"
t
.
pattern
=
'test/unit/**/*_test.rb'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录