Sha256: f1fe718136f2875b13d9626fcabfe405406896d4b6d7a16b18d08ac795079850

Contents?: true

Size: 698 Bytes

Versions: 10

Compression:

Stored size: 698 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', '..', 'test_helper')

class CommandsSSHTest < Test::Unit::TestCase
  setup do
    @klass = Vagrant::Commands::SSH

    @persisted_vm = mock("persisted_vm")
    @persisted_vm.stubs(:execute!)

    @env = mock_environment
    @env.stubs(:require_persisted_vm)
    @env.stubs(:vm).returns(@persisted_vm)

    @instance = @klass.new(@env)
  end

  context "executing" do
    setup do
      @env.ssh.stubs(:connect)
    end

    should "require a persisted VM" do
      @env.expects(:require_persisted_vm).once
      @instance.execute
    end

    should "connect to SSH" do
      @env.ssh.expects(:connect).once
      @instance.execute
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
vagrantup-0.3.4 test/vagrant/commands/ssh_test.rb
vagrantup-0.3.3 test/vagrant/commands/ssh_test.rb
vagrantup-0.3.2 test/vagrant/commands/ssh_test.rb
vagrantup-0.3.1 test/vagrant/commands/ssh_test.rb
vagrantup-0.3.0 test/vagrant/commands/ssh_test.rb
vagrant-0.3.4 test/vagrant/commands/ssh_test.rb
vagrant-0.3.3 test/vagrant/commands/ssh_test.rb
vagrant-0.3.2 test/vagrant/commands/ssh_test.rb
vagrant-0.3.1 test/vagrant/commands/ssh_test.rb
vagrant-0.3.0 test/vagrant/commands/ssh_test.rb