Sha256: fb77e3ce859976446dc8c91819f46676a2ab99ad87126a27812f1d2e64d04a73

Contents?: true

Size: 421 Bytes

Versions: 3

Compression:

Stored size: 421 Bytes

Contents

#!/usr/bin/env ruby

require 'expect'
require 'pty'

config_path = "/tmp/test-trollolorc-#{rand(100000)}"
bin_path = File.expand_path('../../../../bin/trollolo', __FILE__)

ENV['TROLLOLO_CONFIG_PATH'] = config_path

PTY.spawn("#{bin_path} #{ARGV.join(' ')}") do |trollolo_out, trollolo_in, pid|
  exit 1 unless trollolo_out.expect('key:', 2)
  trollolo_in.puts('xxx')
  exit 1 unless trollolo_out.expect('token:', 2)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trollolo-0.3.1 spec/integration/wrapper/credentials_input_wrapper
trollolo-0.3.0 spec/integration/wrapper/credentials_input_wrapper
trollolo-0.2.0 spec/integration/wrapper/credentials_input_wrapper