Sha256: 9d11449b1f3bddf42e9f369067f5649d7ebd764e022d42c085b1ee5096432c5e
Contents?: true
Size: 660 Bytes
Versions: 10
Compression:
Stored size: 660 Bytes
Contents
module Kookaburra class UIDriver module HasBrowser Unexpected500 = Class.new(StandardError) # This will fail if the options hash does not include a value for the key :browser def initialize(options = {}) super() @opts = options end def browser @browser ||= @opts.fetch(:browser) end def visit(*args) browser.visit *args no_500_error! end def no_500_error! if browser.has_css?('head title', :text => 'Internal Server Error') sleep 30 if ENV['GIMME_CRAP'] raise Unexpected500, browser.body end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems