lib/cucumber/rb_support/rb_language.rb in cucumber-0.3.102 vs lib/cucumber/rb_support/rb_language.rb in cucumber-0.3.103
- old
+ new
@@ -1,10 +1,11 @@
require 'cucumber/rb_support/rb_dsl'
require 'cucumber/rb_support/rb_world'
require 'cucumber/rb_support/rb_step_definition'
require 'cucumber/rb_support/rb_hook'
require 'cucumber/rb_support/rb_transform'
+require 'cucumber/rb_support/regexp_argument_matcher'
module Cucumber
module RbSupport
# Raised if a World block returns Nil.
class NilWorld < StandardError
@@ -51,9 +52,13 @@
e.message << "\nFailed to load #{code_file}"
raise e
ensure
@step_definitions = nil
end
+ end
+
+ def arguments_from(regexp, step_name)
+ @regexp_argument_matcher.arguments_from(regexp, step_name)
end
def snippet_text(step_keyword, step_name, multiline_arg_class = nil)
escaped = Regexp.escape(step_name).gsub('\ ', ' ').gsub('/', '\/')
escaped = escaped.gsub(PARAM_PATTERN, ESCAPED_PARAM_PATTERN)