ERB预处理ruby代码

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  

  

posted on 2016-03-29 19:45  tim_sheng  阅读(974)  评论(0编辑  收藏  举报

导航