Sha256: 4d7f99166f366b83c4f5b8a11cf84bb55a061d04cfdbe8cf6d2305381bd8e91e
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 KB
Contents
module WatirSpec module Runner module BrowserHelper def browser $browser end end module MessagesHelper def messages browser.div(id: 'messages').divs.map(&:text) end end module_function def execute start_server configure add_guard_hook @executed = true end def execute_if_necessary execute unless @executed end def configure Thread.abort_on_exception = true return unless defined?(RSpec) RSpec.configure do |config| config.include(BrowserHelper) config.include(MessagesHelper) config.before(:suite) { $browser = WatirSpec.new_browser } config.after(:suite) { $browser.close } end end def start_server WatirSpec::Server.run! end def add_guard_hook return if WatirSpec.unguarded? at_exit { WatirSpec::Guards.report } end end # SpecHelper end # WatirSpec
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watir-6.10.1 | lib/watirspec/runner.rb |