Sha256: 9712bdfae122f92993df6872a20677caf7a77e17dfbf3234d2ca65c913a8ef7a

Contents?: true

Size: 823 Bytes

Versions: 1

Compression:

Stored size: 823 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

root = File.expand_path('../..', __FILE__)

require root + '/vendor/capybara/spec/spec_helper'
require root + '/lib/terminus'

Terminus.debug = ENV.has_key?('DEBUG')
Terminus.sockets = false if ENV.has_key?('NOSOCKET')

case ENV['USER_AGENT']
  when 'auto'      then Terminus.start_browser
  when 'PhantomJS' then Terminus.start_phantomjs
end

def select_browser
  Terminus.browser = case ENV['USER_AGENT']
                     when 'iPhone' then {:os => /iPhone/}
                     when 'iPad'   then {:os => /like Mac OS X/}
                     when 'auto'   then Terminus.browser
                     when String   then {:name => ENV['USER_AGENT']}
                     else               :docked
                     end
end

at_exit { Terminus.browser.return_to_dock }

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
terminus-0.4.0 spec/spec_helper.rb