Sha256: ecd1fa0deaeec16e52eda0a96b66d7affd99875e27432ba0478d9dfe3224c5f0

Contents?: true

Size: 724 Bytes

Versions: 10

Compression:

Stored size: 724 Bytes

Contents

require 'vagrant-openstack-provider/spec_helper'

describe VagrantPlugins::Openstack::Command::Reset do
  describe 'cmd' do
    let(:env) do
      {}.tap do |env|
        env[:ui] = double('ui')
        env[:ui].stub(:info).with(anything)
        env[:machine] = double('machine')
        env[:machine].stub(:data_dir) { '/my/data/dir' }
      end
    end

    before :each do
      @reset_cmd = VagrantPlugins::Openstack::Command::Reset.new(nil, env)
    end

    it 'resets vagrant openstack machines' do
      expect(env[:ui]).to receive(:info).with('Vagrant OpenStack Provider has been reset')
      expect(FileUtils).to receive(:remove_dir).with('/my/data/dir')
      @reset_cmd.cmd('reset', [], env)
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
vagrant-openstack-provider-0.13.0 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-0.12.0 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-illuin-0.11.1 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-0.11.0 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-0.10.0 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-0.9.0 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-0.8.0 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-0.7.2 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-0.7.1 spec/vagrant-openstack-provider/command/reset_spec.rb
vagrant-openstack-provider-0.7.0 spec/vagrant-openstack-provider/command/reset_spec.rb