Sha256: ace5ddd9e8f6b5f46192896a5fe638ceca1e94a25d5e7a1d142e7342e27e7548

Contents?: true

Size: 862 Bytes

Versions: 1

Compression:

Stored size: 862 Bytes

Contents

require 'spec_helper'
require 'fileutils'

describe 'Version' do
  describe 'list' do
    context 'vimorg dirctory exists' do
      it 'echo available vim versions' do
        expect(Version.list.join("\n")).to match(/start\n(v7-.+\n)+tip$/)
      end
    end
    context 'vimorg dirctory is not found' do
      before do
        FileUtils.rm_rf(get_vimorg_dir)
      end
      it 'echo nothing' do
        expect(Version.list).to eq []
      end
    end
  end

  describe 'versions' do
    context 'vims dirctory exists' do
      it 'echo installed vim versions' do
        expect(Version.versions.join("\n")).to eq("v7-4-083\nv7-4-103")
      end
    end
    context 'vims dirctory is not found' do
      before do
        FileUtils.rm_rf(get_vims_dir)
      end
      it 'echo nothing' do
        expect(Version.versions).to eq []
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vvm-rb-0.0.13 spec/version_spec.rb