The Ruby implementation of the programming language API.
# File lib/cucumber/rb_support/rb_language.rb, line 65 def begin_rb_scenario(scenario) create_world extend_world connect_world(scenario) end
# File lib/cucumber/rb_support/rb_language.rb, line 85 def build_rb_world_factory(world_modules, proc) if(proc) raise MultipleWorld.new(@world_proc, proc) if @world_proc @world_proc = proc end @world_modules ||= [] @world_modules += world_modules end
# File lib/cucumber/rb_support/rb_language.rb, line 94 def load_code_file(code_file) load File.expand_path(code_file) # This will cause self.add_step_definition, self.add_hook, and self.add_transform to be called from RbDsl end
# File lib/cucumber/rb_support/rb_language.rb, line 71 def register_rb_hook(phase, tag_expressions, proc) add_hook(phase, RbHook.new(self, tag_expressions, proc)) end
# File lib/cucumber/rb_support/rb_language.rb, line 79 def register_rb_step_definition(regexp, proc_or_sym, options) step_definition = RbStepDefinition.new(self, regexp, proc_or_sym, options) @step_definitions << step_definition step_definition end
# File lib/cucumber/rb_support/rb_language.rb, line 75 def register_rb_transform(regexp, proc) add_transform(RbTransform.new(self, regexp, proc)) end
# File lib/cucumber/rb_support/rb_language.rb, line 60 def snippet_text(code_keyword, step_name, multiline_arg_class, snippet_type = :regexp) snippet_class = typed_snippet_class(snippet_type) snippet_class.new(code_keyword, step_name, multiline_arg_class).to_s end
# File lib/cucumber/rb_support/rb_language.rb, line 50 def step_matches(name_to_match, name_to_format) @step_definitions.map do |step_definition| if(arguments = step_definition.arguments_from(name_to_match)) StepMatch.new(step_definition, name_to_match, name_to_format, arguments) else nil end end.compact end
Generated with the Darkfish Rdoc Generator 2.