diff options
author | Angus MacArthur <amacarthur@blackberry.com> | 2013-04-16 17:06:04 -0400 |
---|---|---|
committer | Angus MacArthur <amacarthur@blackberry.com> | 2013-04-16 17:07:07 -0400 |
commit | d8e061d73bb29374e679aef5ee6356383bcaa80e (patch) | |
tree | d25f9d7fd1f852dd5fbe2986526a5cd063624005 | |
parent | 2b54f0578fad97620591ee1fcd307777f8836d8c (diff) | |
download | gitlab-shell-d8e061d73bb29374e679aef5ee6356383bcaa80e.tar.gz |
improve tests for forking from namespaces
Change-Id: I0c343c03ee3f033641f9958030ac57d92296547d
-rw-r--r-- | spec/gitlab_projects_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb index 5c93f7c..d0d6764 100644 --- a/spec/gitlab_projects_spec.rb +++ b/spec/gitlab_projects_spec.rb @@ -78,13 +78,13 @@ describe GitlabProjects do end describe :fork_project do - let(:gl_project_import) { build_gitlab_projects('import-project', repo_name, 'https://github.com/randx/six.git') } - let(:gl_projects_fork) { build_gitlab_projects('fork-project', repo_name, 'forked-to-namespace')} + let(:source_repo_name) { File.join('source-namespace', repo_name) } let(:dest_repo) { File.join(tmp_repos_path, 'forked-to-namespace', repo_name) } + let(:gl_projects_fork) { build_gitlab_projects('fork-project', source_repo_name, 'forked-to-namespace') } + let(:gl_projects_import) { build_gitlab_projects('import-project', source_repo_name, 'https://github.com/randx/six.git') } before do - FileUtils.mkdir_p(tmp_repo_path) - gl_project_import.exec + gl_projects_import.exec end it "should not fork into a namespace that doesn't exist" do @@ -118,7 +118,7 @@ describe GitlabProjects do argv(*args) gl_projects = GitlabProjects.new gl_projects.stub(repos_path: tmp_repos_path) - gl_projects.stub(full_path: tmp_repo_path) + gl_projects.stub(full_path: File.join(tmp_repos_path, gl_projects.project_name)) gl_projects end |