module World
  module Helpers
    # Same as #step but raises a RuntimeError if undefined
    def step_assert_defined(step_string)
      step(step_string)
    rescue Cucumber::Undefined
      raise "Step \"#{step_string}\" must be defined!"
    end
  end
end
