Sha256: ae55da6f8f9571551f41b3abb2e7febfc42ccd6da80eafbec3182567fb7fad86

Contents?: true

Size: 811 Bytes

Versions: 3

Compression:

Stored size: 811 Bytes

Contents

require 'spec_helper'

describe 'Uninstaller' do
  describe 'uninstall' do
    context 'vim version is currently used' do
      before :all do
        version = VERSION1
        Switcher.new(version).use
        @uninstaller = Uninstaller.new(version)
      end

      after :all do
        Switcher.new('system').use
      end

      it 'raise error' do
        expect(proc { @uninstaller.uninstall }).to raise_error
      end
    end

    context 'can uninstall version' do
      before :all do
        @version = VERSION1
        Uninstaller.new(@version).uninstall
      end

      it 'delete src dir' do
        expect(File.exist?(get_src_dir(@version))).not_to be_true
      end

      it 'delete vims dir' do
        expect(File.exist?(get_vims_dir(@version))).not_to be_true
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vvm-rb-0.2.2 spec/uninstaller_spec.rb
vvm-rb-0.2.1 spec/uninstaller_spec.rb
vvm-rb-0.2.0 spec/uninstaller_spec.rb