File: test_group.rb

package info (click to toggle)
ruby-sshkit 1.21.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 700 kB
  • sloc: ruby: 3,522; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 444 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require "helper"
require "sshkit"

module SSHKit
  module Runner
    class TestGroup < UnitTest
      def test_wraps_ruby_standard_error_in_execute_error
        localhost = Host.new(:local)
        runner = Group.new([localhost]) { raise "oh no!" }
        error = assert_raises(SSHKit::Runner::ExecuteError) do
          runner.execute
        end
        assert_match(/while executing.*localhost/, error.message)
      end
    end
  end
end