spec/lib/spawn_spec.rb in evrone-common-spawn-0.0.3 vs spec/lib/spawn_spec.rb in evrone-common-spawn-0.0.4
- old
+ new
@@ -11,12 +11,17 @@
expect(subject.spawn 'true').to eq 0
end
end
context "open_ssh" do
+ let(:user) { ENV['SSH_USER'] || 'vagrant' }
+ let(:host) { ENV['SSH_HOST'] || 'localhost' }
+ let(:pass) { ENV['SSH_PASS'] || 'vagrant' }
+ let(:port) { ENV['SSH_PORT'] || 2222 }
let(:ssh) { nil }
+
it "should be" do
- subject.open_ssh(ENV['SSH_HOST'], ENV['SSH_USER'], password: ENV['SSH_PASS']) do |ssh|
+ subject.open_ssh(host, user, password: pass, port: port) do |ssh|
expect(ssh.spawn 'true').to eq 0
end
end
end
end