I think this is enough to verify that you are sending the correct commands to the ssh server. You apparently are not using the server, so you need to believe that the server is working properly and is being tested.
, , , SSH, ( RSpec 2):
describe "SSH Access" do
let (:ssh_connection) { mock("SSH Connection") }
before (:each) do
Net::SSH.stub(:start) { ssh_connection }
end
it "should send rename commands to the connection" do
ssh_connection.should_receive(:exec!).ordered.with("expected command")
ssh_connection.should_receive(:exec!).ordered.with("next expected command")
SSHAccessClass.rename_files!
end
end