From 9a726dc389c1210f416129aa27f6de364fb22c2c Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Mon, 22 Jul 2013 13:12:20 +0000 Subject: [PATCH] Add monkey patch to hack aruba steps (must, should) --- features/support/env.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/features/support/env.rb b/features/support/env.rb index fb0a661..06d38ec 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1 +1,16 @@ +module Cucumber + class Runtime + alias :old_step_match :step_match + + def step_match(step_name, name_to_report = nil) + if step_name.include? ' must ' + name_to_report = step_name.dup + step_name.gsub! ' must ', ' should ' + end + + old_step_match(step_name, name_to_report) + end + end +end + require 'aruba/cucumber'