首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何通过rake任务传递-f specdoc选项

如何通过rake任务传递-f specdoc选项
EN

Stack Overflow用户
提问于 2010-05-23 10:37:44
回答 2查看 1.6K关注 0票数 6

我使用的是rails 2.3.5,.rake规范运行良好。

这来自spec --help。

代码语言:javascript
复制
spec --help

-f, --format FORMAT[:WHERE]      Specifies what format to use for output. Specify WHERE to tell
                                    the formatter where to write the output. All built-in formats
                                    expect WHERE to be a file name, and will write to $stdout if it's
                                    not specified. The --format option may be specified several times
                                    if you want several outputs

                                    Builtin formats:
                                    silent|l                 : No output
                                    progress|p               : Text-based progress bar
                                    profile|o                : Text-based progress bar with profiling of 10 slowest examples
                                    specdoc|s                : Code example doc strings
                                    nested|n                 : Code example doc strings with nested groups indented
                                    html|h                   : A nice HTML report
                                    failing_examples|e       : Write all failing examples - input for --example

                                failing_example_groups|g : Write all failing example groups - input for --example

如何通过rake任务传递-f specdoc。

EN

回答 2

Stack Overflow用户

发布于 2011-02-01 05:14:02

向rails根目录添加或编辑.rspec文件。例如,我的现在包含以下选项:

代码语言:javascript
复制
--colour
--format documentation

请注意,specdoc格式的新名称是RSpec 2.1中的documentation。

票数 8
EN

Stack Overflow用户

发布于 2012-11-09 23:22:15

rake规范将遵守SPEC_OPTS环境变量。

代码语言:javascript
复制
rake spec SPEC_OPTS="--format specdoc"
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2890521

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档