Welcome to mirror list, hosted at ThFree Co, Russian Federation.

common_util.rb « import_export « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2542a59bb00d019f0b4502e31e0c3193d4f32393 (plain)
1
2
3
4
5
6
7
8
9
10
module ImportExport
  module CommonUtil
    def setup_symlink(tmpdir, symlink_name)
      allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(tmpdir)

      File.open("#{tmpdir}/test", 'w') { |file| file.write("test") }
      FileUtils.ln_s("#{tmpdir}/test", "#{tmpdir}/#{symlink_name}")
    end
  end
end