Sha256: 8d28b68352ecad616d17bcdefcc6a7dc4fba9b036d85c502afe63ebf06abfa11

Contents?: true

Size: 712 Bytes

Versions: 13

Compression:

Stored size: 712 Bytes

Contents

describe Vagrant::CLI do
  describe "parsing options" do
    let(:klass) do
      Class.new(described_class)
    end

    let(:environment) do
      ui = double("UI::Silent")
      ui.stub(:info => "bar")
      env = double("Vagrant::Environment")
      env.stub(:ui => ui)
      env.stub(:root_path => "foo")
      env.stub(:machine_names => [])
      env
    end

    it "returns a non-zero exit status if an invalid command is given" do
      result = klass.new(["destroypp"], environment).execute
      result.should_not == 0
    end

    it "returns an exit status of zero if a valid command is given" do
      result = klass.new(["destroy"], environment).execute
      result.should == 0
    end
  end
end

Version data entries

13 entries across 13 versions & 5 rubygems

Version Path
vagrant-shell-0.2.9 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/test/unit/vagrant/cli_test.rb
tnargav-1.2.3 test/unit/vagrant/cli_test.rb
vagrant-shell-0.2.8 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/test/unit/vagrant/cli_test.rb
vagrant-shell-0.2.6 vendor/bundle/gems/tnargav-1.2.2/test/unit/vagrant/cli_test.rb
vagrant-shell-0.2.5 vendor/bundle/gems/tnargav-1.2.2/test/unit/vagrant/cli_test.rb
tnargav-1.2.2 test/unit/vagrant/cli_test.rb
vagrantup-1.1.3 test/unit/vagrant/cli_test.rb
vagrantup-1.1.2 test/unit/vagrant/cli_test.rb
vagrantup-1.1.1 test/unit/vagrant/cli_test.rb
vagrantup-1.1.0 test/unit/vagrant/cli_test.rb
vagrantup-1.1.4 test/unit/vagrant/cli_test.rb
vagrant-actionio-0.0.9 vendor/bundle/bundler/gems/vagrant-c74251a1d9c0/test/unit/vagrant/cli_test.rb
vagrant-lxc-0.0.1 vendor/vagrant/test/unit/vagrant/cli_test.rb