Module: MediawikiSelenium::StrictPending

Defined in:
lib/mediawiki_selenium/cucumber/strict_pending.rb

Overview

Implements a stricter version of pending that fails when a given block of expectations passes, alerting the user that the step definition should no longer be pending.

Defined Under Namespace

Classes: Pending

Instance Method Summary collapse

Instance Method Details

#pending(*args) ⇒ Object

Delegates to Cucumber's pending but re-raises any Cucumber::Pending exception as a strict failure.



13
14
15
16
17
18
19
20
21
# File 'lib/mediawiki_selenium/cucumber/strict_pending.rb', line 13

def pending(*args)
  super
rescue Cucumber::Pending => e
  if block_given?
    raise Pending, e.message
  else
    raise e
  end
end