如何通过 rake 任务传递 -f specdoc 选项 [英] How to pass -f specdoc option through rake task
本文介绍了如何通过 rake 任务传递 -f specdoc 选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 rails 2.3.5 .rake 规范工作正常.
I am using rails 2.3.5 .rake spec works fine.
这是来自规范 --help.
This is from spec --help.
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.
How do I pass -f specdoc through rake task.
推荐答案
向 rails 根目录添加或编辑 .rspec 文件.例如,我的现在包含以下选项:
Add or edit a .rspec file to the rails root. For example, mine now contains the following options:
--colour
--format documentation
请注意,specdoc 格式的新名称是 RSpec 2.1 中的文档.
Note that the new name for the specdoc format is documentation in RSpec 2.1.
这篇关于如何通过 rake 任务传递 -f specdoc 选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文