spec/lib/ssh_spec.rb in vx-lib-shell-0.1.3 vs spec/lib/ssh_spec.rb in vx-lib-shell-0.1.4

- old
+ new

@@ -85,9 +85,18 @@ code = run_ssh("echo $USER; kill -9 $$") expect(collected).to eq "#{user}\r\n" expect(code).to eq(-4) end + it "dont modify options" do + options = {read_timeout: 100} + code = run_ssh("echo 1", options) + expect(code).to eq(0) + code = run_ssh("echo 1", options) + expect(code).to eq(0) + expect(options).to eq(read_timeout: 100) + end + def open_ssh(&block) described_class.open(host, user, password: pass, paranoid: false, verbose: 2, port: port, &block) end def re(s)