Sha256: 9c4485e57623c4b7763d676388dfb81f1a3573e27f881cc0eca92d0ae82416ba

Contents?: true

Size: 995 Bytes

Versions: 6

Compression:

Stored size: 995 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

6 entries across 6 versions & 1 rubygems

Version Path
doit-1.0.9 test/run_test.rb
doit-1.0.8 test/run_test.rb
doit-1.0.7 test/run_test.rb
doit-1.0.5 test/run_test.rb
doit-1.0.4 test/run_test.rb
doit-1.0.3 test/run_test.rb