Sha256: edc3e0b5d63d2a2290e820d3e7bc09aced728b8a042c8bf4cd3435af1940cedd

Contents?: true

Size: 987 Bytes

Versions: 4

Compression:

Stored size: 987 Bytes

Contents

require 'test_helper'
require 'run'
require 'my'
require 'doit'

describe Run do

  it 'coverage #info' do
    _out, _err = capture_io do
      Run.init('', '')
      Run.info
    end
  end

  it "where '' returns nil" do
    _out, _err = capture_io do
      Run.init('', '')
      assert_equal nil, Run.ssh
    end
  end

  it "where 'a' returns nil" do
    _out, _err = capture_io do
      Run.init('', 'a')
      assert_equal nil, Run.ssh
    end
  end

  it "where 'a@b' returns 'ssh a@b'" do
    _out, _err = capture_io do
      Run.init('', 'a@b')
      assert_equal 'ssh a@b', Run.ssh
    end
  end

  it "where 'a@b:c' returns 'ssh a@b'" do
    _out, _err = capture_io do
      Run.init('', 'a@b:c')
      assert_equal 'ssh a@b', Run.ssh
    end
  end

  it 'coverage #run' do
    _out, _err = capture_io do
      Run.init('', '')
      Run.run
    end
  end

  it 'coverage #run noop' do
    out = noop {
	Run.init('', '')
	Run.run
    }
    assert_match(/EOS/, out)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
doit-1.0.2 test/run_test.rb
doit-1.0.1 test/run_test.rb
doit-0.3.9 test/run_test.rb
doit-0.3.6 test/run_test.rb