features/support/env.rb in adhearsion-2.0.0.beta1 vs features/support/env.rb in adhearsion-2.0.0.rc1

- old
+ new

@@ -1,5 +1,7 @@ +# encoding: utf-8 + require 'simplecov' require 'simplecov-rcov' class SimpleCov::Formatter::MergedFormatter def format(result) SimpleCov::Formatter::HTMLFormatter.new.format(result) @@ -16,57 +18,17 @@ require 'cucumber' require 'aruba/cucumber' require 'adhearsion' -module ChildProcess - class << self - def new(*args) - case os - when :unix, :macosx, :linux, :solaris, :bsd, :cygwin - if posix_spawn? - Unix::PosixSpawnProcess.new(args) - elsif jruby? - JRuby::Process.new(args) - else - Unix::ForkExecProcess.new(args) - end - when :windows - Windows::Process.new(args) - else - raise Error, "unsupported OS #{os.inspect}" - end - end - alias_method :build, :new - - def os - @os ||= ( - require "rbconfig" - host_os = RbConfig::CONFIG['host_os'].downcase - - case host_os - when /linux/ - :linux - when /darwin|mac os/ - :macosx - when /mswin|msys|mingw32/ - :windows - when /cygwin/ - :cygwin - when /solaris|sunos/ - :solaris - when /bsd/ - :bsd - else - raise Error, "unknown os: #{host_os.inspect}" - end - ) - end - end # class << self -end # ChildProcess - Before do @aruba_timeout_seconds = ENV['ARUBA_TIMEOUT'] || RUBY_PLATFORM == 'java' ? 60 : 30 + ENV['AHN_PUNCHBLOCK_RECONNECT_ATTEMPTS'] = '0' + ENV['AHN_PUNCHBLOCK_PORT'] = '1' +end + +Before '@reconnect' do + ENV['AHN_PUNCHBLOCK_RECONNECT_ATTEMPTS'] = '100' end # TODO: check for name space / run issues # NOTE: this will not stop a forked process (eg. daemon mode) After do