Module: Cucumber::World::Pending

Defined in:
lib/gems/cucumber-0.1.15/lib/cucumber/world/pending.rb

Instance Method Summary collapse

Instance Method Details

#pending(message = "TODO") ⇒ Object

Mark this step as pending



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/world/pending.rb', line 7

def pending(message = "TODO")
  if block_given?
    begin
      yield
    rescue Exception => e
      raise Cucumber::ForcedPending.new(message)
    end
    raise Cucumber::ForcedPending.new("Expected pending '#{message}' to fail. No Error was raised.")
  else
    raise Cucumber::ForcedPending.new(message)
  end
end