ban*_*623 26
建立以前的答案,非常简单:
rspec /directory/containing/specs/** --format h > output.html
Run Code Online (Sandbox Code Playgroud)
我使用以下路径规范/**从我的rails应用程序的根目录运行它.我希望有所帮助.如果您有非"_spec.rb"文件,则可能需要修改path参数.
小智 13
我们可以补充一下
--format html
--out rspec_results.html
Run Code Online (Sandbox Code Playgroud)
到.rspec
所以rspec会将结果写入rspec_results.html
请参阅https://coderwall.com/p/gfmeuw
RSpec有一个命令行选项来生成html格式的输出:
rspec <path_to_spec_file> --format html
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
17114 次 |
| 最近记录: |