Sha256: 1ac2bcbbade8b8c288ea3329c08387f5afbe05946c76466a7620796ad71c82bd
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
require 'bundler/setup' require 'fileutils' require 'spec_helper' require 'tmpdir' require 'vim-flavor' def create_a_test_repo(path) system(<<-"END") { mkdir -p #{path.inspect} cd #{path.inspect} git init mkdir autoload doc plugin touch autoload/foo.vim doc/foo.txt plugin/foo.vim git add autoload doc plugin git commit -am 'Commit foo' for version in '1.0.0' '1.1.1' '1.1.2' '1.2.1' '1.2.2' do echo "*foo* $version" >doc/foo.txt git commit -am 'Update foo' git tag -a -m "Version $version" "$version" done } >/dev/null END end def update_a_test_repo(path) system(<<-"END") { cd #{path.inspect} && for version in '1.0.9' '1.1.9' '1.2.9' '1.3.9' do echo "*foo* $version" >doc/foo.txt git commit -am 'Update foo' git tag -a -m "Version $version" "$version" done } >/dev/null END end def create_temporary_directory() Dir.mktmpdir() end def remove_temporary_directory(path) FileUtils.remove_entry_secure(path) end def with_temporary_directory() before :each do @tmp_path = create_temporary_directory() @original_dot_path = Vim::Flavor.dot_path @dot_path = "#{@tmp_path}/.vim-flavor" Vim::Flavor.dot_path = @dot_path end after :each do Vim::Flavor.dot_path = @original_dot_path remove_temporary_directory(@tmp_path) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vim-flavor-0.0.3 | spec/spec_helper.rb |
vim-flavor-0.0.2 | spec/spec_helper.rb |