Class: Cucumber::Tcl::StepDefinitions::ExecuteResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/tcl/step_definitions.rb

Constant Summary collapse

PENDING_ERRORS =
{
  'pending' => -> { raise Cucumber::Pending, 'TODO: Step not yet implemented' },
  'skipped' => -> { raise Cucumber::Core::Test::Result::Skipped },
  'undefined' => -> { raise Cucumber::Core::Test::Result::Undefined }
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ ExecuteResponse

Returns a new instance of ExecuteResponse.



32
33
34
# File 'lib/cucumber/tcl/step_definitions.rb', line 32

def initialize(raw)
  @raw = raw
end

Instance Method Details

#raise_any_pending_errorObject



42
43
44
# File 'lib/cucumber/tcl/step_definitions.rb', line 42

def raise_any_pending_error
  PENDING_ERRORS[@raw]&.call
end