Class: Cucumber::Wire::Protocol::Requests::Invoke

Inherits:
RequestHandler show all
Defined in:
lib/cucumber/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::Wire::RequestHandler

Instance Method Details

#execute(step_definition_id, args) ⇒ Object



59
60
61
62
63
64
65
# File 'lib/cucumber/wire/protocol/requests.rb', line 59

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

#handle_diff(tables) ⇒ Object



77
78
79
80
81
82
83
84
# File 'lib/cucumber/wire/protocol/requests.rb', line 77

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

#handle_diff!(tables) ⇒ Object



71
72
73
74
75
# File 'lib/cucumber/wire/protocol/requests.rb', line 71

def handle_diff!(tables)
  table1 = table(tables[0])
  table2 = table(tables[1])
  table1.diff!(table2)
end

#handle_pending(message) ⇒ Object

Raises:

  • (Pending)


67
68
69
# File 'lib/cucumber/wire/protocol/requests.rb', line 67

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