加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 如何通过rake任务传递-f specdoc选项

发布时间:2020-12-16 21:22:29 所属栏目:百科 来源:网络整理
导读:我正在使用rails 2.3.5 .rake spec工作正常. 这是来自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
我正在使用rails 2.3.5 .rake spec工作正常.

这是来自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.

解决方法

将.rspec文件添加或编辑到rails根目录.例如,我的现在包含以下选项:
--colour
--format documentation

请注意,specdoc格式的新名称是RSpec 2.1中的文档.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读