Class: Cucumber::Undefined
- Inherits:
-
Core::Test::Result::Undefined
- Object
- Core::Test::Result::Undefined
- Cucumber::Undefined
- Defined in:
- lib/cucumber/errors.rb
Overview
Raised when there is no matching StepDefinition for a step.
Class Method Summary collapse
Class Method Details
.from(result, step_name) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/cucumber/errors.rb', line 7 def self.from(result, step_name) if result.is_a?(self) return result.(with_prefix(result.)) end begin raise self.new(with_prefix(step_name)) rescue => exception return exception end end |
.with_prefix(step_name) ⇒ Object
19 20 21 |
# File 'lib/cucumber/errors.rb', line 19 def self.with_prefix(step_name) %(Undefined step: "#{step_name}") end |