class Cucumber::Wire::Connections

Attributes

connections[R]

Public Class Methods

new(connections, configuration, registry) click to toggle source
# File lib/cucumber/wire/connections.rb, line 19
def initialize(connections, configuration, registry)
  raise ArgumentError unless connections
  @connections = connections
  @configuration = configuration
  @registry = registry
end

Public Instance Methods

begin_scenario(test_case) click to toggle source
# File lib/cucumber/wire/connections.rb, line 37
def begin_scenario(test_case)
  connections.each { |c| c.begin_scenario(test_case) }
end
end_scenario(test_case) click to toggle source
# File lib/cucumber/wire/connections.rb, line 41
def end_scenario(test_case)
  connections.each { |c| c.end_scenario(test_case) }
end
find_match(test_step) click to toggle source
# File lib/cucumber/wire/connections.rb, line 26
def find_match(test_step)
  matches = step_matches(test_step.name)
  return unless matches.any?
  # TODO: handle ambiguous matches (push to cucumber?)
  matches.first
end
snippets(code_keyword, step_name, multiline_arg_class_name) click to toggle source
# File lib/cucumber/wire/connections.rb, line 45
def snippets(code_keyword, step_name, multiline_arg_class_name)
  connections.map { |c| c.snippet_text(code_keyword, step_name, multiline_arg_class_name) }.flatten
end
step_matches(step_name) click to toggle source
# File lib/cucumber/wire/connections.rb, line 33
def step_matches(step_name)
  connections.map{ |c| c.step_matches(step_name, @registry)}.flatten
end