Sha256: aca2648a9fcb2735c6ab7655260fa24b276811dd03bbe2ea0df558b4759217a8

Contents?: true

Size: 761 Bytes

Versions: 22

Compression:

Stored size: 761 Bytes

Contents

require File.expand_path(__FILE__).sub(%r(/test/.*), '/test/test_helper.rb')
require File.expand_path(__FILE__).sub(%r(.*/test/), '').sub(/test_(.*)\.rb/,'\1')

require 'scout/open'

class TestOpenRemote < Test::Unit::TestCase
  def test_wget
    teardown
    5.times do
      assert(Misc.fixutf8(Open.wget('http://google.com', :quiet => true, :nocache => true).read) =~ /html/)
      assert(Misc.fixutf8(Open.wget('http://google.com', :quiet => true).read) =~ /html/)
    end
  end

  def test_ssh
    TmpFile.with_file("TEST") do |f|
      begin
        assert_equal "TEST", Open.ssh("ssh://localhost:#{f}").read
      rescue ConcurrentStreamProcessFailed
        raise $! unless $!.message.include? "Connection refused"
      end
    end if false
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
scout-essentials-1.6.5 test/scout/open/test_remote.rb
scout-essentials-1.6.4 test/scout/open/test_remote.rb
scout-essentials-1.6.3 test/scout/open/test_remote.rb
scout-essentials-1.6.2 test/scout/open/test_remote.rb
scout-essentials-1.6.1 test/scout/open/test_remote.rb
scout-essentials-1.6.0 test/scout/open/test_remote.rb
scout-essentials-1.3.1 test/scout/open/test_remote.rb
scout-essentials-1.3.0 test/scout/open/test_remote.rb
scout-essentials-1.2.0 test/scout/open/test_remote.rb
scout-essentials-1.1.1 test/scout/open/test_remote.rb
scout-essentials-1.1.0 test/scout/open/test_remote.rb
scout-essentials-1.0.0 test/scout/open/test_remote.rb
scout-gear-9.1.0 test/scout/open/test_remote.rb
scout-gear-9.0.0 test/scout/open/test_remote.rb
scout-gear-8.1.0 test/scout/open/test_remote.rb
scout-gear-8.0.0 test/scout/open/test_remote.rb
scout-gear-7.3.0 test/scout/open/test_remote.rb
scout-gear-7.2.0 test/scout/open/test_remote.rb
scout-gear-7.1.0 test/scout/open/test_remote.rb
scout-gear-6.0.0 test/scout/open/test_remote.rb