Method: Cucumber::Glue::ProtoWorld#pending

Defined in:
lib/cucumber/glue/proto_world.rb

#pending(message = 'TODO') ⇒ Object

Mark the matched step as pending.



97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/cucumber/glue/proto_world.rb', line 97

def pending(message = 'TODO')
  if block_given?
    begin
      yield
    rescue Exception
      raise Pending, message
    end
    raise Pending, "Expected pending '#{message}' to fail. No Error was raised. No longer pending?"
  else
    raise Pending, message
  end
end