【发布时间】:2015-03-03 03:22:51
【问题描述】:
我有一个 AfterStep 的 Hook,它与旧版本的 Cucumber 完美配合。
AfterStep do |scenario|
scenario.steps.each do |step|
puts "This is the step #{step.name}" unless !step.currently_active
end
end
现在的问题是新的 Scenario 类 (Cucumber::Ast::Facade::Scenario) 没有将步骤列表作为公共变量。
在这个新版本中,如何获取 AfterStep 挂钩上的步骤列表(并了解当前步骤)?
谢谢你:)
【问题讨论】: