Sha256: 9b67a5253d76a4dab992c2f43802322dab666517e9f3acb25834fb74b2389181

Contents?: true

Size: 684 Bytes

Versions: 26

Compression:

Stored size: 684 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'rspec'
require 'rspec/given'
require 'childprocess'
require 'ffi'
require 'uia'

include Uia

def wait_until(timeout=10, &block)
  start = Time.now
  until (result = block.call) || (Time.now - start > timeout)
    sleep 0.25
  end

  raise 'Timed out' unless result
  result
end

RSpec.configure do |config|
  config.before(:all) do
    @app = ChildProcess.build('spec/app/WindowsForms.exe').start
    wait_until { Uia.find_element title: /MainFormWindow/ }
  end

  config.after(:all) do
    @app.stop unless @app.exited?
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
uia-1.0 spec/spec_helper.rb
uia-0.8 spec/spec_helper.rb
uia-0.7 spec/spec_helper.rb
uia-0.7.alpha.1 spec/spec_helper.rb
uia-0.6 spec/spec_helper.rb
uia-0.5 spec/spec_helper.rb
uia-0.4.4 spec/spec_helper.rb
uia-0.4.3 spec/spec_helper.rb
uia-0.4.2 spec/spec_helper.rb
uia-0.4.1 spec/spec_helper.rb
uia-0.4 spec/spec_helper.rb
uia-0.3.3 spec/spec_helper.rb
uia-0.3.2 spec/spec_helper.rb
uia-0.3.1 spec/spec_helper.rb
uia-0.3 spec/spec_helper.rb
uia-0.2.1 spec/spec_helper.rb
uia-0.2 spec/spec_helper.rb
uia-0.1.3.1 spec/spec_helper.rb
uia-0.1.3 spec/spec_helper.rb
uia-0.1.2.3 spec/spec_helper.rb