Sha256: ef0043cde782947ebb6a257a512b5ed5d4c13c07427e7767c8290230128c6bd6

Contents?: true

Size: 711 Bytes

Versions: 101

Compression:

Stored size: 711 Bytes

Contents

require "test_helper"

class CommandBaseTest < Test::Unit::TestCase
  setup do
    @klass = Vagrant::Command::Base
    @env = vagrant_env
  end

  context "initialization" do
    should "require an environment" do
      assert_raises(Vagrant::Errors::CLIMissingEnvironment) { @klass.new([], {}, {}) }
      assert_nothing_raised { @klass.new([], {}, { :env => @env }) }
    end
  end

  context "extracting a name from a usage string" do
    should "extract properly" do
      assert_equal "init", @klass.extract_name_from_usage("init")
      assert_equal "init", @klass.extract_name_from_usage("init [foo] [bar]")
      assert_equal "ssh-config", @klass.extract_name_from_usage("ssh-config")
    end
  end
end

Version data entries

101 entries across 101 versions & 9 rubygems

Version Path
bmhatfield-vagrant-1.0.10 test/unit_legacy/vagrant/command/base_test.rb
bmhatfield-vagrant-1.0.9 test/unit_legacy/vagrant/command/base_test.rb
bmhatfield-vagrant-1.0.8 test/unit_legacy/vagrant/command/base_test.rb
bmhatfield-vagrant-1.0.7 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-1.0.7 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-1.0.6 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-1.0.5 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-1.0.4 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-1.0.3 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-1.0.2 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-1.0.1 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-1.0.0 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-0.9.99.2 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-0.9.99.1 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-0.9.7 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-0.9.6 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-0.9.5 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-0.9.4 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-0.9.3 test/unit_legacy/vagrant/command/base_test.rb
vagrantup-0.9.2 test/unit_legacy/vagrant/command/base_test.rb