Sha256: 90680186a9ff6a60f75a40509ce35cd44de3743d38ef3e6a80c51a4ddeca4cf2

Contents?: true

Size: 695 Bytes

Versions: 11

Compression:

Stored size: 695 Bytes

Contents

require 'vagrant-conoha/spec_helper'

describe VagrantPlugins::ConoHa::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::ConoHa::Command::Reset.new(nil, env)
    end

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
vagrant-conoha-0.1.10 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.9 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.8 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.7 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.6 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.5 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.4 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.3 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.2 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.1 spec/vagrant-conoha/command/reset_spec.rb
vagrant-conoha-0.1.0 spec/vagrant-conoha/command/reset_spec.rb