Sha256: c95b5b02c24320aa52710abd2b195240837db210988104fbdccd63e88c22765d

Contents?: true

Size: 574 Bytes

Versions: 28

Compression:

Stored size: 574 Bytes

Contents

module MediawikiSelenium
  # 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.
  #
  module StrictPending
    class Pending < StandardError
    end

    # Delegates to Cucumber's pending but re-raises any `Cucumber::Pending`
    # exception as a strict failure.
    #
    def pending(*args)
      super
    rescue Cucumber::Pending => e
      if block_given?
        raise Pending, e.message
      else
        raise e
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
mediawiki_selenium-1.8.1 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.8.0 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.7.4 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.7.3 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.7.2 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.7.1 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.7.0 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.6.5 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.6.4 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.6.3 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.6.2 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.6.1 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.6.0 lib/mediawiki_selenium/cucumber/strict_pending.rb
mediawiki_selenium-1.5.0 lib/mediawiki_selenium/support/modules/strict_pending.rb
mediawiki_selenium-1.4.0 lib/mediawiki_selenium/support/modules/strict_pending.rb
mediawiki_selenium-1.3.0 lib/mediawiki_selenium/support/modules/strict_pending.rb
mediawiki_selenium-0.4.3 lib/mediawiki_selenium/support/modules/strict_pending.rb
mediawiki_selenium-1.2.1 lib/mediawiki_selenium/support/modules/strict_pending.rb
mediawiki_selenium-1.2.0 lib/mediawiki_selenium/support/modules/strict_pending.rb
mediawiki_selenium-1.1.0 lib/mediawiki_selenium/support/modules/strict_pending.rb