Sha256: 7021e24e12640a256812a96e4b847eae6a96bb97d4cac1d39a498dc35457485d

Contents?: true

Size: 974 Bytes

Versions: 4

Compression:

Stored size: 974 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-0.3.0 test/run_test.rb
doit-0.2.8 test/run_test.rb
doit-0.2.7 test/run_test.rb
doit-0.2.4 test/run_test.rb