首页 > 技术文章 > ERB预处理ruby代码

timsheng 2016-03-29 19:45 原文

cucumber.yml 文件可以用erb预处理,这样允许你在cucumber.yml文件中使用ruby代码生成值。所以如果你有几个配置要用相同值时,你可以这样写

# config/cucumber.yml
##YAML Template
---
<% common = "--tags ~@wip --strict" %>
default: <%= common %> features  
html_report: <%= common %> --format html --out=features_report.html features  

  

推荐阅读