Class: Cucumber::WireSupport::WireProtocol::Requests::Invoke

Inherits:
RequestHandler show all
Defined in:
lib/cucumber/wire_support/wire_protocol/requests.rb

Instance Method Summary collapse

Methods inherited from RequestHandler

#handle_fail, #handle_success, #initialize

Constructor Details

This class inherits a constructor from Cucumber::WireSupport::RequestHandler

Instance Method Details

#execute(step_definition_id, args) ⇒ Object



58
59
60
61
62
63
64
# File 'lib/cucumber/wire_support/wire_protocol/requests.rb', line 58

def execute(step_definition_id, args)
  request_params = {
    :id => step_definition_id,
    :args => args
  }
  super(request_params)
end

#handle_diff(tables) ⇒ Object



76
77
78
79
80
81
82
83
# File 'lib/cucumber/wire_support/wire_protocol/requests.rb', line 76

def handle_diff(tables)
  begin
    handle_diff!(tables)
  rescue Cucumber::Ast::Table::Different
    @connection.diff_failed
  end
  @connection.diff_ok
end

#handle_diff!(tables) ⇒ Object



70
71
72
73
74
# File 'lib/cucumber/wire_support/wire_protocol/requests.rb', line 70

def handle_diff!(tables)
  table1 = Ast::Table.new(tables[0])
  table2 = Ast::Table.new(tables[1])
  table1.diff!(table2)
end

#handle_pending(message) ⇒ Object

Raises:



66
67
68
# File 'lib/cucumber/wire_support/wire_protocol/requests.rb', line 66

def handle_pending(message)
  raise Pending, message || "TODO"
end