Sha256: 365055c4c9ab94bce74dbfcff99a3850928dfb948aea9a85947481695a856e22
Contents?: true
Size: 700 Bytes
Versions: 16
Compression:
Stored size: 700 Bytes
Contents
module RepoHelper def self.system!(command) status = system command raise "error in '#{command}'" if not status end def self.setup_source_repo(repo_dir) FileUtils.rm_rf repo_dir FileUtils.cp_r "spec/test_data/sample_repo", repo_dir Dir.chdir repo_dir do script = <<~SCRIPT git init touch testfile git add . git commit -m 'initial commit' git checkout -b some_branch touch some_file git add some_file git commit -m "add some_file" git checkout master SCRIPT script.each_line { |l| system! "#{l.chomp} > /dev/null 2>&1" } end end end RepoHelper.setup_source_repo "tmp/repo.git"
Version data entries
16 entries across 16 versions & 1 rubygems