Sha256: 9fc30d7afd309b79df5e36d950cde2fa1da88c4967dad9eca56c4305c588cb87
Contents?: true
Size: 938 Bytes
Versions: 8
Compression:
Stored size: 938 Bytes
Contents
# encoding: utf-8 $LOAD_PATH.unshift File.dirname(__FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'rspec' require 'guards' require 'server' require 'operawatir/helper' OperaWatir.api = 2 RSpec.configure do |config| config.mock_with :rr end module WatirSpec extend self attr_accessor :args, :guarded def host "http://#{Server.bind}:#{Server.port}" end alias_method :files, :host def guards @guards ||= [] end def guarded? !!@guarded end module Helpers def browser OperaWatir::Helper.browser end def window browser.active_window end def fixture(*paths) [WatirSpec.host, *paths].join('/') end end end include OperaWatir::DesktopExceptions include WatirSpec::Guard::Helpers RSpec.configure do |config| config.include WatirSpec::Helpers config.before(:suite) do Thread.new { WatirSpec::Server.run! } end end
Version data entries
8 entries across 8 versions & 1 rubygems