Sha256: 894041bd24949d2b9a06142f2c27727185e8033b3f9e3d61e8a45de96752455f

Contents?: true

Size: 810 Bytes

Versions: 5

Compression:

Stored size: 810 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', 'simplecov_setup')
require 'vimpack'

def check_git_repo(path)
  res = %x{ ( cd #{path} ; git status ; cd - )2>&1 }
  res.should_not match(/Not a git repo/)
end

def check_git_submodule(submodule, repo)
  name = submodule.split('/')[-1]
  res = %x{ ( cd #{repo} ; git submodule ; cd - )2>&1 }
  res.should match(/#{name}/)
end

def check_vimpack_remote(remote_name, url)
  res = %x{ cd /tmp/vimpack_home/.vimpack ; git config -l ; cd - }
  res.should match(/remote.#{Regexp.escape(remote_name)}.url=#{Regexp.escape(url)}/)
end

HOME = '/tmp/vimpack_home'
ENV['HOME'] = HOME
def remove_temp_home
  ::FileUtils.rm_rf(HOME) if ::File.exists?(HOME)
  ::FileUtils.mkdir(HOME)
end

RSpec.configure do |config|
  config.before(:each) do
    remove_temp_home
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vimpack-0.0.4 spec/spec_helper.rb
vimpack-0.0.3 spec/spec_helper.rb
vimpack-0.0.2 spec/spec_helper.rb
vimpack-0.0.1.1 spec/spec_helper.rb
vimpack-0.0.1 spec/spec_helper.rb